From d2710461cd2c6006ff1232bbcd02fd3f26bc0270 Mon Sep 17 00:00:00 2001 From: camposl Date: Fri, 21 Feb 2025 01:33:16 +0100 Subject: [PATCH] sap-topology updated --- .../ietf_sap_topology/ComposeLink.py | 53 - .../ietf_sap_topology/ComposeNetwork.py | 115 --- .../ietf_sap_topology/ComposeNode.py | 107 -- .../ietf_sap_topology/ComposeTermPoint.py | 102 -- .../ietf_sap_topology/ManualFixes.py | 73 -- .../nbi_plugins/ietf_sap_topology/Networks.py | 29 +- .../ietf_sap_topology/SAP_Topology.py | 30 +- .../ietf_sap_topology/bindings/__init__.py | 256 ----- .../bindings/networks/__init__.py | 162 --- .../bindings/networks/network/__init__.py | 385 ------- .../networks/network/link/__init__.py | 294 ------ .../network/link/destination/__init__.py | 159 --- .../networks/network/link/source/__init__.py | 157 --- .../network/link/supporting_link/__init__.py | 172 ---- .../networks/network/link/te/__init__.py | 603 ----------- .../network/link/te/bundled_links/__init__.py | 118 --- .../te/bundled_links/bundled_link/__init__.py | 203 ---- .../link/te/component_links/__init__.py | 120 --- .../component_link/__init__.py | 204 ---- .../te/information_source_entry/__init__.py | 749 -------------- .../information_source_state/__init__.py | 248 ----- .../topology/__init__.py | 162 --- .../__init__.py | 206 ---- .../max_lsp_bandwidth/__init__.py | 163 --- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 156 --- .../label_restrictions/__init__.py | 120 --- .../label_restriction/__init__.py | 450 --------- .../ethernet_label_range/__init__.py | 154 --- .../label_restriction/label_end/__init__.py | 119 --- .../label_end/te_label/__init__.py | 234 ----- .../label_end/te_label/otn/__init__.py | 154 --- .../label_restriction/label_start/__init__.py | 120 --- .../label_start/te_label/__init__.py | 234 ----- .../label_start/te_label/otn/__init__.py | 154 --- .../label_restriction/label_step/__init__.py | 200 ---- .../label_step/otn/__init__.py | 158 --- .../otn_label_range/__init__.py | 256 ----- .../max_link_bandwidth/__init__.py | 119 --- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 116 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../max_resv_link_bandwidth/__init__.py | 119 --- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 116 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../te_nsrlgs/__init__.py | 118 --- .../te_srlgs/__init__.py | 115 --- .../unreserved_bandwidth/__init__.py | 163 --- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 116 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../te/information_source_state/__init__.py | 248 ----- .../topology/__init__.py | 162 --- .../network/link/te/recovery/__init__.py | 154 --- .../network/link/te/statistics/__init__.py | 810 --------------- .../link/te/te_link_attributes/__init__.py | 938 ------------------ .../te_link_attributes/client_svc/__init__.py | 115 --- .../external_domain/__init__.py | 205 ---- .../__init__.py | 206 ---- .../max_lsp_bandwidth/__init__.py | 163 --- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 156 --- .../label_restrictions/__init__.py | 120 --- .../label_restriction/__init__.py | 450 --------- .../ethernet_label_range/__init__.py | 154 --- .../label_restriction/label_end/__init__.py | 119 --- .../label_end/te_label/__init__.py | 234 ----- .../label_end/te_label/otn/__init__.py | 154 --- .../label_restriction/label_start/__init__.py | 120 --- .../label_start/te_label/__init__.py | 234 ----- .../label_start/te_label/otn/__init__.py | 154 --- .../label_restriction/label_step/__init__.py | 200 ---- .../label_step/otn/__init__.py | 158 --- .../otn_label_range/__init__.py | 256 ----- .../max_link_bandwidth/__init__.py | 119 --- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 116 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../max_resv_link_bandwidth/__init__.py | 119 --- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 116 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../te_link_attributes/otn_link/__init__.py | 199 ---- .../te_link_attributes/te_nsrlgs/__init__.py | 118 --- .../te_link_attributes/te_srlgs/__init__.py | 115 --- .../te_link_attributes/underlay/__init__.py | 326 ------ .../underlay/backup_path/__init__.py | 207 ---- .../backup_path/path_element/__init__.py | 321 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../underlay/primary_path/__init__.py | 158 --- .../primary_path/path_element/__init__.py | 320 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../tunnel_termination_points/__init__.py | 154 --- .../underlay/tunnels/__init__.py | 167 ---- .../underlay/tunnels/tunnel/__init__.py | 170 ---- .../unreserved_bandwidth/__init__.py | 163 --- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 116 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../network/link/te/underlay/__init__.py | 154 --- .../network/network_types/__init__.py | 118 --- .../network_types/te_topology/__init__.py | 36 - .../networks/network/node/__init__.py | 291 ------ .../network/node/supporting_node/__init__.py | 168 ---- .../networks/network/node/te/__init__.py | 519 ---------- .../network/node/te/geolocation/__init__.py | 193 ---- .../te/information_source_entry/__init__.py | 451 --------- .../connectivity_matrices/__init__.py | 412 -------- .../connectivity_matrix/__init__.py | 405 -------- .../connectivity_matrix/from_/__init__.py | 155 --- .../from_/label_restrictions/__init__.py | 120 --- .../label_restriction/__init__.py | 450 --------- .../ethernet_label_range/__init__.py | 154 --- .../label_restriction/label_end/__init__.py | 119 --- .../label_end/te_label/__init__.py | 234 ----- .../label_end/te_label/otn/__init__.py | 154 --- .../label_restriction/label_start/__init__.py | 120 --- .../label_start/te_label/__init__.py | 234 ----- .../label_start/te_label/otn/__init__.py | 154 --- .../label_restriction/label_step/__init__.py | 200 ---- .../label_step/otn/__init__.py | 158 --- .../otn_label_range/__init__.py | 256 ----- .../optimizations/__init__.py | 199 ---- .../objective_function/__init__.py | 116 --- .../optimization_metric/__init__.py | 241 ----- .../__init__.py | 118 --- .../route_object_exclude_object/__init__.py | 365 ------- .../as_number_hop/__init__.py | 154 --- .../label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../srlg/__init__.py | 115 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../__init__.py | 118 --- .../route_object_include_object/__init__.py | 325 ------ .../as_number_hop/__init__.py | 154 --- .../label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../optimizations/tiebreakers/__init__.py | 120 --- .../tiebreakers/tiebreaker/__init__.py | 122 --- .../path_constraints/__init__.py | 523 ---------- .../path_affinities_values/__init__.py | 116 --- .../path_affinities_value/__init__.py | 161 --- .../path_affinity_names/__init__.py | 116 --- .../path_affinity_name/__init__.py | 162 --- .../affinity_name/__init__.py | 120 --- .../path_metric_bounds/__init__.py | 116 --- .../path_metric_bound/__init__.py | 165 --- .../path_srlgs_lists/__init__.py | 116 --- .../path_srlgs_list/__init__.py | 161 --- .../path_srlgs_names/__init__.py | 116 --- .../path_srlgs_name/__init__.py | 161 --- .../path_constraints/te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 163 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../path_properties/__init__.py | 318 ------ .../path_affinities_values/__init__.py | 116 --- .../path_affinities_value/__init__.py | 161 --- .../path_affinity_names/__init__.py | 116 --- .../path_affinity_name/__init__.py | 162 --- .../affinity_name/__init__.py | 120 --- .../path_properties/path_metric/__init__.py | 159 --- .../path_route_objects/__init__.py | 119 --- .../path_route_object/__init__.py | 327 ------ .../as_number_hop/__init__.py | 154 --- .../path_route_object/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../path_srlgs_lists/__init__.py | 116 --- .../path_srlgs_list/__init__.py | 161 --- .../path_srlgs_names/__init__.py | 116 --- .../path_srlgs_name/__init__.py | 161 --- .../connectivity_matrix/to/__init__.py | 155 --- .../to/label_restrictions/__init__.py | 120 --- .../label_restriction/__init__.py | 450 --------- .../ethernet_label_range/__init__.py | 154 --- .../label_restriction/label_end/__init__.py | 119 --- .../label_end/te_label/__init__.py | 234 ----- .../label_end/te_label/otn/__init__.py | 154 --- .../label_restriction/label_start/__init__.py | 120 --- .../label_start/te_label/__init__.py | 234 ----- .../label_start/te_label/otn/__init__.py | 154 --- .../label_restriction/label_step/__init__.py | 200 ---- .../label_step/otn/__init__.py | 158 --- .../otn_label_range/__init__.py | 256 ----- .../connectivity_matrix/underlay/__init__.py | 326 ------ .../underlay/backup_path/__init__.py | 207 ---- .../backup_path/path_element/__init__.py | 321 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../underlay/primary_path/__init__.py | 158 --- .../primary_path/path_element/__init__.py | 320 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../tunnel_termination_points/__init__.py | 154 --- .../underlay/tunnels/__init__.py | 167 ---- .../underlay/tunnels/tunnel/__init__.py | 170 ---- .../label_restrictions/__init__.py | 120 --- .../label_restriction/__init__.py | 450 --------- .../ethernet_label_range/__init__.py | 154 --- .../label_restriction/label_end/__init__.py | 119 --- .../label_end/te_label/__init__.py | 234 ----- .../label_end/te_label/otn/__init__.py | 154 --- .../label_restriction/label_start/__init__.py | 120 --- .../label_start/te_label/__init__.py | 234 ----- .../label_start/te_label/otn/__init__.py | 154 --- .../label_restriction/label_step/__init__.py | 200 ---- .../label_step/otn/__init__.py | 158 --- .../otn_label_range/__init__.py | 256 ----- .../optimizations/__init__.py | 199 ---- .../objective_function/__init__.py | 116 --- .../optimization_metric/__init__.py | 241 ----- .../__init__.py | 118 --- .../route_object_exclude_object/__init__.py | 365 ------- .../as_number_hop/__init__.py | 154 --- .../label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../srlg/__init__.py | 115 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../__init__.py | 118 --- .../route_object_include_object/__init__.py | 325 ------ .../as_number_hop/__init__.py | 154 --- .../label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../optimizations/tiebreakers/__init__.py | 120 --- .../tiebreakers/tiebreaker/__init__.py | 122 --- .../path_constraints/__init__.py | 523 ---------- .../path_affinities_values/__init__.py | 116 --- .../path_affinities_value/__init__.py | 161 --- .../path_affinity_names/__init__.py | 116 --- .../path_affinity_name/__init__.py | 162 --- .../affinity_name/__init__.py | 120 --- .../path_metric_bounds/__init__.py | 116 --- .../path_metric_bound/__init__.py | 165 --- .../path_srlgs_lists/__init__.py | 116 --- .../path_srlgs_list/__init__.py | 161 --- .../path_srlgs_names/__init__.py | 116 --- .../path_srlgs_name/__init__.py | 161 --- .../path_constraints/te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 163 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../path_properties/__init__.py | 318 ------ .../path_affinities_values/__init__.py | 116 --- .../path_affinities_value/__init__.py | 161 --- .../path_affinity_names/__init__.py | 116 --- .../path_affinity_name/__init__.py | 162 --- .../affinity_name/__init__.py | 120 --- .../path_properties/path_metric/__init__.py | 159 --- .../path_route_objects/__init__.py | 119 --- .../path_route_object/__init__.py | 327 ------ .../as_number_hop/__init__.py | 154 --- .../path_route_object/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../path_srlgs_lists/__init__.py | 116 --- .../path_srlgs_list/__init__.py | 161 --- .../path_srlgs_names/__init__.py | 116 --- .../path_srlgs_name/__init__.py | 161 --- .../underlay/__init__.py | 326 ------ .../underlay/backup_path/__init__.py | 207 ---- .../backup_path/path_element/__init__.py | 321 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../underlay/primary_path/__init__.py | 158 --- .../primary_path/path_element/__init__.py | 320 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../tunnel_termination_points/__init__.py | 154 --- .../underlay/tunnels/__init__.py | 167 ---- .../underlay/tunnels/tunnel/__init__.py | 170 ---- .../information_source_state/__init__.py | 248 ----- .../topology/__init__.py | 162 --- .../underlay_topology/__init__.py | 118 --- .../te/information_source_state/__init__.py | 248 ----- .../topology/__init__.py | 162 --- .../network/node/te/statistics/__init__.py | 207 ---- .../connectivity_matrix_entry/__init__.py | 282 ------ .../node/te/statistics/node/__init__.py | 273 ----- .../node/te/te_node_attributes/__init__.py | 357 ------- .../connectivity_matrices/__init__.py | 412 -------- .../connectivity_matrix/__init__.py | 405 -------- .../connectivity_matrix/from_/__init__.py | 155 --- .../from_/label_restrictions/__init__.py | 120 --- .../label_restriction/__init__.py | 450 --------- .../ethernet_label_range/__init__.py | 154 --- .../label_restriction/label_end/__init__.py | 119 --- .../label_end/te_label/__init__.py | 234 ----- .../label_end/te_label/otn/__init__.py | 154 --- .../label_restriction/label_start/__init__.py | 120 --- .../label_start/te_label/__init__.py | 234 ----- .../label_start/te_label/otn/__init__.py | 154 --- .../label_restriction/label_step/__init__.py | 200 ---- .../label_step/otn/__init__.py | 158 --- .../otn_label_range/__init__.py | 256 ----- .../optimizations/__init__.py | 199 ---- .../objective_function/__init__.py | 116 --- .../optimization_metric/__init__.py | 241 ----- .../__init__.py | 118 --- .../route_object_exclude_object/__init__.py | 365 ------- .../as_number_hop/__init__.py | 154 --- .../label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../srlg/__init__.py | 115 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../__init__.py | 118 --- .../route_object_include_object/__init__.py | 325 ------ .../as_number_hop/__init__.py | 154 --- .../label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../optimizations/tiebreakers/__init__.py | 120 --- .../tiebreakers/tiebreaker/__init__.py | 122 --- .../path_constraints/__init__.py | 523 ---------- .../path_affinities_values/__init__.py | 116 --- .../path_affinities_value/__init__.py | 161 --- .../path_affinity_names/__init__.py | 116 --- .../path_affinity_name/__init__.py | 162 --- .../affinity_name/__init__.py | 120 --- .../path_metric_bounds/__init__.py | 116 --- .../path_metric_bound/__init__.py | 165 --- .../path_srlgs_lists/__init__.py | 116 --- .../path_srlgs_list/__init__.py | 161 --- .../path_srlgs_names/__init__.py | 116 --- .../path_srlgs_name/__init__.py | 161 --- .../path_constraints/te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 163 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../path_properties/__init__.py | 318 ------ .../path_affinities_values/__init__.py | 116 --- .../path_affinities_value/__init__.py | 161 --- .../path_affinity_names/__init__.py | 116 --- .../path_affinity_name/__init__.py | 162 --- .../affinity_name/__init__.py | 120 --- .../path_properties/path_metric/__init__.py | 159 --- .../path_route_objects/__init__.py | 119 --- .../path_route_object/__init__.py | 327 ------ .../as_number_hop/__init__.py | 154 --- .../path_route_object/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../path_srlgs_lists/__init__.py | 116 --- .../path_srlgs_list/__init__.py | 161 --- .../path_srlgs_names/__init__.py | 116 --- .../path_srlgs_name/__init__.py | 161 --- .../connectivity_matrix/to/__init__.py | 155 --- .../to/label_restrictions/__init__.py | 120 --- .../label_restriction/__init__.py | 450 --------- .../ethernet_label_range/__init__.py | 154 --- .../label_restriction/label_end/__init__.py | 119 --- .../label_end/te_label/__init__.py | 234 ----- .../label_end/te_label/otn/__init__.py | 154 --- .../label_restriction/label_start/__init__.py | 120 --- .../label_start/te_label/__init__.py | 234 ----- .../label_start/te_label/otn/__init__.py | 154 --- .../label_restriction/label_step/__init__.py | 200 ---- .../label_step/otn/__init__.py | 158 --- .../otn_label_range/__init__.py | 256 ----- .../connectivity_matrix/underlay/__init__.py | 326 ------ .../underlay/backup_path/__init__.py | 207 ---- .../backup_path/path_element/__init__.py | 321 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../underlay/primary_path/__init__.py | 158 --- .../primary_path/path_element/__init__.py | 320 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../tunnel_termination_points/__init__.py | 154 --- .../underlay/tunnels/__init__.py | 167 ---- .../underlay/tunnels/tunnel/__init__.py | 170 ---- .../label_restrictions/__init__.py | 120 --- .../label_restriction/__init__.py | 450 --------- .../ethernet_label_range/__init__.py | 154 --- .../label_restriction/label_end/__init__.py | 119 --- .../label_end/te_label/__init__.py | 234 ----- .../label_end/te_label/otn/__init__.py | 154 --- .../label_restriction/label_start/__init__.py | 120 --- .../label_start/te_label/__init__.py | 234 ----- .../label_start/te_label/otn/__init__.py | 154 --- .../label_restriction/label_step/__init__.py | 200 ---- .../label_step/otn/__init__.py | 158 --- .../otn_label_range/__init__.py | 256 ----- .../optimizations/__init__.py | 199 ---- .../objective_function/__init__.py | 116 --- .../optimization_metric/__init__.py | 241 ----- .../__init__.py | 118 --- .../route_object_exclude_object/__init__.py | 365 ------- .../as_number_hop/__init__.py | 154 --- .../label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../srlg/__init__.py | 115 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../__init__.py | 118 --- .../route_object_include_object/__init__.py | 325 ------ .../as_number_hop/__init__.py | 154 --- .../label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../optimizations/tiebreakers/__init__.py | 120 --- .../tiebreakers/tiebreaker/__init__.py | 122 --- .../path_constraints/__init__.py | 523 ---------- .../path_affinities_values/__init__.py | 116 --- .../path_affinities_value/__init__.py | 161 --- .../path_affinity_names/__init__.py | 116 --- .../path_affinity_name/__init__.py | 162 --- .../affinity_name/__init__.py | 120 --- .../path_metric_bounds/__init__.py | 116 --- .../path_metric_bound/__init__.py | 165 --- .../path_srlgs_lists/__init__.py | 116 --- .../path_srlgs_list/__init__.py | 161 --- .../path_srlgs_names/__init__.py | 116 --- .../path_srlgs_name/__init__.py | 161 --- .../path_constraints/te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 163 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../path_properties/__init__.py | 318 ------ .../path_affinities_values/__init__.py | 116 --- .../path_affinities_value/__init__.py | 161 --- .../path_affinity_names/__init__.py | 116 --- .../path_affinity_name/__init__.py | 162 --- .../affinity_name/__init__.py | 120 --- .../path_properties/path_metric/__init__.py | 159 --- .../path_route_objects/__init__.py | 119 --- .../path_route_object/__init__.py | 327 ------ .../as_number_hop/__init__.py | 154 --- .../path_route_object/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../path_srlgs_lists/__init__.py | 116 --- .../path_srlgs_list/__init__.py | 161 --- .../path_srlgs_names/__init__.py | 116 --- .../path_srlgs_name/__init__.py | 161 --- .../underlay/__init__.py | 326 ------ .../underlay/backup_path/__init__.py | 207 ---- .../backup_path/path_element/__init__.py | 321 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../underlay/primary_path/__init__.py | 158 --- .../primary_path/path_element/__init__.py | 320 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../tunnel_termination_points/__init__.py | 154 --- .../underlay/tunnels/__init__.py | 167 ---- .../underlay/tunnels/tunnel/__init__.py | 170 ---- .../underlay_topology/__init__.py | 118 --- .../te/tunnel_termination_point/__init__.py | 597 ----------- .../client_layer_adaptation/__init__.py | 117 --- .../switching_capability/__init__.py | 206 ---- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 163 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../geolocation/__init__.py | 193 ---- .../local_link_connectivities/__init__.py | 418 -------- .../label_restrictions/__init__.py | 120 --- .../label_restriction/__init__.py | 450 --------- .../ethernet_label_range/__init__.py | 154 --- .../label_restriction/label_end/__init__.py | 119 --- .../label_end/te_label/__init__.py | 234 ----- .../label_end/te_label/otn/__init__.py | 154 --- .../label_restriction/label_start/__init__.py | 120 --- .../label_start/te_label/__init__.py | 234 ----- .../label_start/te_label/otn/__init__.py | 154 --- .../label_restriction/label_step/__init__.py | 200 ---- .../label_step/otn/__init__.py | 158 --- .../otn_label_range/__init__.py | 256 ----- .../local_link_connectivity/__init__.py | 368 ------- .../label_restrictions/__init__.py | 120 --- .../label_restriction/__init__.py | 450 --------- .../ethernet_label_range/__init__.py | 154 --- .../label_restriction/label_end/__init__.py | 119 --- .../label_end/te_label/__init__.py | 234 ----- .../label_end/te_label/otn/__init__.py | 154 --- .../label_restriction/label_start/__init__.py | 120 --- .../label_start/te_label/__init__.py | 234 ----- .../label_start/te_label/otn/__init__.py | 154 --- .../label_restriction/label_step/__init__.py | 200 ---- .../label_step/otn/__init__.py | 158 --- .../otn_label_range/__init__.py | 256 ----- .../optimizations/__init__.py | 199 ---- .../objective_function/__init__.py | 116 --- .../optimization_metric/__init__.py | 241 ----- .../__init__.py | 118 --- .../route_object_exclude_object/__init__.py | 365 ------- .../as_number_hop/__init__.py | 154 --- .../label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../srlg/__init__.py | 115 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../__init__.py | 118 --- .../route_object_include_object/__init__.py | 325 ------ .../as_number_hop/__init__.py | 154 --- .../label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../optimizations/tiebreakers/__init__.py | 120 --- .../tiebreakers/tiebreaker/__init__.py | 122 --- .../path_constraints/__init__.py | 523 ---------- .../path_affinities_values/__init__.py | 116 --- .../path_affinities_value/__init__.py | 161 --- .../path_affinity_names/__init__.py | 116 --- .../path_affinity_name/__init__.py | 162 --- .../affinity_name/__init__.py | 120 --- .../path_metric_bounds/__init__.py | 116 --- .../path_metric_bound/__init__.py | 165 --- .../path_srlgs_lists/__init__.py | 116 --- .../path_srlgs_list/__init__.py | 161 --- .../path_srlgs_names/__init__.py | 116 --- .../path_srlgs_name/__init__.py | 161 --- .../path_constraints/te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 163 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../path_properties/__init__.py | 318 ------ .../path_affinities_values/__init__.py | 116 --- .../path_affinities_value/__init__.py | 161 --- .../path_affinity_names/__init__.py | 116 --- .../path_affinity_name/__init__.py | 162 --- .../affinity_name/__init__.py | 120 --- .../path_properties/path_metric/__init__.py | 159 --- .../path_route_objects/__init__.py | 119 --- .../path_route_object/__init__.py | 327 ------ .../as_number_hop/__init__.py | 154 --- .../path_route_object/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../path_srlgs_lists/__init__.py | 116 --- .../path_srlgs_list/__init__.py | 161 --- .../path_srlgs_names/__init__.py | 116 --- .../path_srlgs_name/__init__.py | 161 --- .../underlay/__init__.py | 326 ------ .../underlay/backup_path/__init__.py | 207 ---- .../backup_path/path_element/__init__.py | 321 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../underlay/primary_path/__init__.py | 158 --- .../primary_path/path_element/__init__.py | 320 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../tunnel_termination_points/__init__.py | 154 --- .../underlay/tunnels/__init__.py | 167 ---- .../underlay/tunnels/tunnel/__init__.py | 170 ---- .../optimizations/__init__.py | 199 ---- .../objective_function/__init__.py | 116 --- .../optimization_metric/__init__.py | 241 ----- .../__init__.py | 118 --- .../route_object_exclude_object/__init__.py | 365 ------- .../as_number_hop/__init__.py | 154 --- .../label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../srlg/__init__.py | 115 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../__init__.py | 118 --- .../route_object_include_object/__init__.py | 325 ------ .../as_number_hop/__init__.py | 154 --- .../label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../optimizations/tiebreakers/__init__.py | 120 --- .../tiebreakers/tiebreaker/__init__.py | 122 --- .../path_constraints/__init__.py | 523 ---------- .../path_affinities_values/__init__.py | 116 --- .../path_affinities_value/__init__.py | 161 --- .../path_affinity_names/__init__.py | 116 --- .../path_affinity_name/__init__.py | 162 --- .../affinity_name/__init__.py | 120 --- .../path_metric_bounds/__init__.py | 116 --- .../path_metric_bound/__init__.py | 165 --- .../path_srlgs_lists/__init__.py | 116 --- .../path_srlgs_list/__init__.py | 161 --- .../path_srlgs_names/__init__.py | 116 --- .../path_srlgs_name/__init__.py | 161 --- .../path_constraints/te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 163 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../path_properties/__init__.py | 318 ------ .../path_affinities_values/__init__.py | 116 --- .../path_affinities_value/__init__.py | 161 --- .../path_affinity_names/__init__.py | 116 --- .../path_affinity_name/__init__.py | 162 --- .../affinity_name/__init__.py | 120 --- .../path_properties/path_metric/__init__.py | 159 --- .../path_route_objects/__init__.py | 119 --- .../path_route_object/__init__.py | 327 ------ .../as_number_hop/__init__.py | 154 --- .../path_route_object/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../path_srlgs_lists/__init__.py | 116 --- .../path_srlgs_list/__init__.py | 161 --- .../path_srlgs_names/__init__.py | 116 --- .../path_srlgs_name/__init__.py | 161 --- .../underlay/__init__.py | 326 ------ .../underlay/backup_path/__init__.py | 207 ---- .../backup_path/path_element/__init__.py | 321 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../underlay/primary_path/__init__.py | 158 --- .../primary_path/path_element/__init__.py | 320 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../tunnel_termination_points/__init__.py | 154 --- .../underlay/tunnels/__init__.py | 167 ---- .../underlay/tunnels/tunnel/__init__.py | 170 ---- .../statistics/__init__.py | 207 ---- .../local_link_connectivity/__init__.py | 272 ----- .../tunnel_termination_point/__init__.py | 435 -------- .../__init__.py | 172 ---- .../node/termination_point/__init__.py | 339 ------- .../termination_point/eth_link_tp/__init__.py | 315 ------ .../egress_bandwidth_profile/__init__.py | 355 ------- .../ingress_bandwidth_profile/__init__.py | 355 ------- .../__init__.py | 356 ------- .../termination_point/eth_svc/__init__.py | 158 --- .../supported_classification/__init__.py | 160 --- .../vlan_classification/__init__.py | 202 ---- .../vlan_classification/outer_tag/__init__.py | 202 ---- .../second_tag/__init__.py | 243 ----- .../supported_vlan_operations/__init__.py | 240 ----- .../vlan_pop/__init__.py | 158 --- .../vlan_push/__init__.py | 201 ---- .../vlan_push/outer_tag/__init__.py | 161 --- .../vlan_push/second_tag/__init__.py | 202 ---- .../supporting_termination_point/__init__.py | 222 ----- .../node/termination_point/te/__init__.py | 445 --------- .../te/client_svc/__init__.py | 115 --- .../te/geolocation/__init__.py | 193 ---- .../__init__.py | 206 ---- .../max_lsp_bandwidth/__init__.py | 163 --- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 156 --- .../termination_point/te/otn_ltp/__init__.py | 121 --- .../network/supporting_network/__init__.py | 121 --- .../bindings/networks/network/te/__init__.py | 283 ------ .../network/te/geolocation/__init__.py | 193 ---- .../networks/network/te/nsrlg/__init__.py | 159 --- .../te_topology_identifier/__init__.py | 205 ---- .../bindings/networks/te/__init__.py | 118 --- .../networks/te/templates/__init__.py | 161 --- .../te/templates/link_template/__init__.py | 251 ----- .../te_link_attributes/__init__.py | 858 ---------------- .../external_domain/__init__.py | 205 ---- .../__init__.py | 206 ---- .../max_lsp_bandwidth/__init__.py | 163 --- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 156 --- .../label_restrictions/__init__.py | 120 --- .../label_restriction/__init__.py | 450 --------- .../ethernet_label_range/__init__.py | 154 --- .../label_restriction/label_end/__init__.py | 119 --- .../label_end/te_label/__init__.py | 234 ----- .../label_end/te_label/otn/__init__.py | 154 --- .../label_restriction/label_start/__init__.py | 120 --- .../label_start/te_label/__init__.py | 234 ----- .../label_start/te_label/otn/__init__.py | 154 --- .../label_restriction/label_step/__init__.py | 200 ---- .../label_step/otn/__init__.py | 158 --- .../otn_label_range/__init__.py | 256 ----- .../max_link_bandwidth/__init__.py | 119 --- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 116 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../max_resv_link_bandwidth/__init__.py | 119 --- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 116 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../te_link_attributes/te_nsrlgs/__init__.py | 118 --- .../te_link_attributes/te_srlgs/__init__.py | 115 --- .../te_link_attributes/underlay/__init__.py | 326 ------ .../underlay/backup_path/__init__.py | 207 ---- .../backup_path/path_element/__init__.py | 321 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../underlay/primary_path/__init__.py | 158 --- .../primary_path/path_element/__init__.py | 320 ------ .../path_element/as_number_hop/__init__.py | 154 --- .../path_element/label_hop/__init__.py | 118 --- .../label_hop/te_label/__init__.py | 234 ----- .../label_hop/te_label/otn/__init__.py | 209 ---- .../numbered_link_hop/__init__.py | 193 ---- .../numbered_node_hop/__init__.py | 154 --- .../unnumbered_link_hop/__init__.py | 236 ----- .../tunnel_termination_points/__init__.py | 154 --- .../underlay/tunnels/__init__.py | 167 ---- .../underlay/tunnels/tunnel/__init__.py | 170 ---- .../unreserved_bandwidth/__init__.py | 163 --- .../te_bandwidth/__init__.py | 195 ---- .../te_bandwidth/otn/__init__.py | 116 --- .../te_bandwidth/otn/odulist/__init__.py | 200 ---- .../te/templates/node_template/__init__.py | 251 ----- .../te_node_attributes/__init__.py | 317 ------ .../underlay_topology/__init__.py | 118 --- .../grpc/context/ContextOuterClass.java | 442 +++++---- .../grpc/kpi_sample_types/KpiSampleTypes.java | 87 +- .../grpc/context/ContextOuterClass.java | 442 +++++---- .../grpc/kpi_sample_types/KpiSampleTypes.java | 87 +- 826 files changed, 639 insertions(+), 159108 deletions(-) delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeLink.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeNetwork.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeNode.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeTermPoint.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ManualFixes.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/destination/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/source/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/supporting_link/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/bundled_links/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/bundled_links/bundled_link/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/component_links/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/component_links/component_link/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_state/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_state/topology/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/recovery/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/statistics/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/client_svc/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/otn_link/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/underlay/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/network_types/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/network_types/te_topology/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/supporting_node/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/geolocation/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_state/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_state/topology/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/statistics/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/statistics/node/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/client_svc/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/geolocation/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/otn_ltp/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/supporting_network/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te/geolocation/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te/nsrlg/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te_topology_identifier/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/node_template/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeLink.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeLink.py deleted file mode 100644 index 394b916c5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeLink.py +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from common.proto.context_pb2 import Link -from .bindings.networks.network.link import link -from .NameMapping import NameMappings -from .NetworkTypeEnum import NetworkTypeEnum - -def compose_link( - ietf_link_obj : link, link_specs : Link, name_mappings : NameMappings, network_type : NetworkTypeEnum -) -> None: - src_endpoint_id = link_specs.link_endpoint_ids[0] - ietf_link_obj.source.source_node = name_mappings.get_device_name(src_endpoint_id.device_id) - ietf_link_obj.source.source_tp = name_mappings.get_endpoint_name(src_endpoint_id) - - dst_endpoint_id = link_specs.link_endpoint_ids[-1] - ietf_link_obj.destination.dest_node = name_mappings.get_device_name(dst_endpoint_id.device_id) - ietf_link_obj.destination.dest_tp = name_mappings.get_endpoint_name(dst_endpoint_id) - - ietf_link_obj.te._set_oper_status('up') - - te_link_attrs = ietf_link_obj.te.te_link_attributes - te_link_attrs.access_type = 'point-to-point' - te_link_attrs.admin_status = 'up' - te_link_attrs.name = link_specs.name - - if network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: - link_total_cap_kbps = link_specs.attributes.total_capacity_gbps * 1e6 - link_used_cap_kbps = link_specs.attributes.used_capacity_gbps * 1e6 - link_avail_cap_kbps = link_total_cap_kbps - link_used_cap_kbps - - te_link_attrs.max_link_bandwidth.te_bandwidth.eth_bandwidth = link_total_cap_kbps - unresv_bw = te_link_attrs.unreserved_bandwidth.add(7) - unresv_bw.te_bandwidth.eth_bandwidth = link_avail_cap_kbps - elif network_type == NetworkTypeEnum.TE_OTN_TOPOLOGY: - te_link_attrs.te_delay_metric = 1 - oduitem = te_link_attrs.max_link_bandwidth.te_bandwidth.otn.odulist.add('ietf-layer1-types:ODU0') - oduitem.ts_number = 80 - - unresv_bw = te_link_attrs.unreserved_bandwidth.add(7) - oduitem = unresv_bw.te_bandwidth.otn.odulist.add('ietf-layer1-types:ODU0') - oduitem.ts_number = 80 diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeNetwork.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeNetwork.py deleted file mode 100644 index ef9e7f31e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeNetwork.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging, re -from common.DeviceTypes import DeviceTypeEnum -from common.proto.context_pb2 import TopologyDetails -from .bindings.networks.network import network -from .ComposeLink import compose_link -from .ComposeNode import compose_node -from .NameMapping import NameMappings -from .NetworkTypeEnum import NetworkTypeEnum, get_network_topology_type - -LOGGER = logging.getLogger(__name__) - -IGNORE_DEVICE_TYPES = { - DeviceTypeEnum.CLIENT.value, - DeviceTypeEnum.DATACENTER.value, - DeviceTypeEnum.EMULATED_CLIENT.value, - DeviceTypeEnum.EMULATED_DATACENTER.value, - DeviceTypeEnum.EMULATED_IP_SDN_CONTROLLER, - DeviceTypeEnum.EMULATED_MICROWAVE_RADIO_SYSTEM.value, - DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM.value, - DeviceTypeEnum.EMULATED_XR_CONSTELLATION.value, - DeviceTypeEnum.IP_SDN_CONTROLLER, - DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM.value, - DeviceTypeEnum.NETWORK.value, - DeviceTypeEnum.OPEN_LINE_SYSTEM.value, - DeviceTypeEnum.XR_CONSTELLATION.value, -} - -IGNORE_DEVICE_NAMES = { - NetworkTypeEnum.TE_OTN_TOPOLOGY: { - 'nce-t', '128.32.10.1', '128.32.33.5', '128.32.20.5', '128.32.20.1', '128.32.10.5', - }, - NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: { - 'nce-t', - }, -} - -TE_TOPOLOGY_NAME = 'Huawei-Network' - -def compose_network(ietf_network_obj : network, te_topology_name : str, topology_details : TopologyDetails) -> None: - ietf_network_obj.te.name = TE_TOPOLOGY_NAME - - #te_topology_name = topology_details.name - match = re.match(r'providerId\-([^\-]*)-clientId-([^\-]*)-topologyId-([^\-]*)', te_topology_name) - if match is not None: - provider_id, client_id, topology_id = match.groups() - ietf_network_obj.te_topology_identifier.provider_id = int(provider_id) - ietf_network_obj.te_topology_identifier.client_id = int(client_id) - ietf_network_obj.te_topology_identifier.topology_id = str(topology_id) - else: - ietf_network_obj.te_topology_identifier.provider_id = 10 - ietf_network_obj.te_topology_identifier.client_id = 0 - ietf_network_obj.te_topology_identifier.topology_id = '0' - - ietf_network_obj.network_types.te_topology._set_present() - # TODO: resolve setting of otn_topology/eth_tran_topology network type; not working in bindings. - # See "../ManualFixes.py". - topology_id = ietf_network_obj.te_topology_identifier.topology_id - topology_id = { - '1': NetworkTypeEnum.TE_OTN_TOPOLOGY.value, - '2': NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY.value, - }.get(topology_id, topology_id) - network_type = get_network_topology_type(topology_id) - if network_type == NetworkTypeEnum.TE_OTN_TOPOLOGY: - #ietf_network_obj.network_types.te_topology.otn_topology._set_present() - pass - elif network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: - #ietf_network_obj.network_types.te_topology.eth_tran_topology._set_present() - pass - else: - raise Exception('Unsupported TopologyId({:s})'.format(str(topology_id))) - - name_mappings = NameMappings() - - ignore_device_uuids = set() - - for device in topology_details.devices: - device_uuid = device.device_id.device_uuid.uuid - - device_type = device.device_type - if device_type in IGNORE_DEVICE_TYPES: - ignore_device_uuids.add(device_uuid) - continue - - device_name = device.name - if device_name in IGNORE_DEVICE_NAMES.get(network_type, set()): - ignore_device_uuids.add(device_uuid) - continue - - ietf_node_obj = ietf_network_obj.node.add(device_name) - compose_node(ietf_node_obj, device, name_mappings, network_type) - - for link in topology_details.links: - link_device_uuids = { - endpoint_id.device_id.device_uuid.uuid - for endpoint_id in link.link_endpoint_ids - } - if len(ignore_device_uuids.intersection(link_device_uuids)) > 0: - continue - link_name = link.name - ietf_link_obj = ietf_network_obj.link.add(link_name) - compose_link(ietf_link_obj, link, name_mappings, network_type) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeNode.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeNode.py deleted file mode 100644 index 24da280e6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeNode.py +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging -from common.proto.context_pb2 import Device -from .bindings.networks.network.node import node -from .ComposeTermPoint import compose_term_point -from .NameMapping import NameMappings -from .NetworkTypeEnum import NetworkTypeEnum - -LOGGER = logging.getLogger(__name__) - -MAPPINGS_TE_NODE_NAME = { - '10.0.10.1' : 'OA', - '10.0.20.1' : 'P', - '10.0.30.1' : 'OE', - '10.0.40.1' : 'P', - - '128.32.10.1': 'ONT1', - '128.32.20.1': 'ONT2', - '128.32.33.5': 'OLT', -} - -IGNORE_ENDPOINT_NAMES = {'mgmt', 'eth1'} - -def compose_node( - ietf_node_obj : node, device : Device, name_mappings : NameMappings, network_type : NetworkTypeEnum -) -> None: - device_name = device.name - - name_mappings.store_device_name(device) - - ietf_node_obj.te_node_id = device_name - - ietf_node_obj.te._set_oper_status('up') - ietf_node_obj.te.te_node_attributes.admin_status = 'up' - ietf_node_obj.te.te_node_attributes.name = MAPPINGS_TE_NODE_NAME.get(device_name, device_name) - - for endpoint in device.device_endpoints: - endpoint_name = endpoint.name - if endpoint_name in IGNORE_ENDPOINT_NAMES: continue - if network_type == NetworkTypeEnum.TE_OTN_TOPOLOGY and endpoint.endpoint_type != 'optical': continue - - ietf_tp_obj = ietf_node_obj.termination_point.add(endpoint_name) - compose_term_point(ietf_tp_obj, device, endpoint, name_mappings, network_type) - - if network_type == NetworkTypeEnum.TE_OTN_TOPOLOGY: - if device_name in {'10.0.30.1', '10.0.40.1'}: - ntaw = ietf_node_obj.te.tunnel_termination_point.add('NTAw') - ntaw.admin_status = 'up' - ntaw.encoding = 'ietf-te-types:lsp-encoding-oduk' - ntaw_llc = ntaw.local_link_connectivities.local_link_connectivity.add('500') - ntaw_llc.is_allowed = True - ntaw.name = '1-1-1-1-1' - ntaw._set_oper_status('up') - ntaw.protection_type = 'ietf-te-types:lsp-protection-unprotected' - ntaw.switching_capability = 'ietf-te-types:switching-otn' - - ntax = ietf_node_obj.te.tunnel_termination_point.add('NTAx') - ntax.admin_status = 'up' - ntax.encoding = 'ietf-te-types:lsp-encoding-oduk' - ntax_llc = ntax.local_link_connectivities.local_link_connectivity.add('501') - ntax_llc.is_allowed = True - ntax.name = '1-1-1-1-1' - ntax._set_oper_status('up') - ntax.protection_type = 'ietf-te-types:lsp-protection-unprotected' - ntax.switching_capability = 'ietf-te-types:switching-otn' - elif device_name in {'10.0.10.1', '10.0.20.1'}: - ntax = ietf_node_obj.te.tunnel_termination_point.add('NTAx') - ntax.admin_status = 'up' - ntax.encoding = 'ietf-te-types:lsp-encoding-oduk' - ntax_llc = ntax.local_link_connectivities.local_link_connectivity.add('501') - ntax_llc.is_allowed = True - ntax.name = '1-1-1-1-1' - ntax._set_oper_status('up') - ntax.protection_type = 'ietf-te-types:lsp-protection-unprotected' - ntax.switching_capability = 'ietf-te-types:switching-otn' - - ntaw = ietf_node_obj.te.tunnel_termination_point.add('NTAw') - ntaw.admin_status = 'up' - ntaw.encoding = 'ietf-te-types:lsp-encoding-oduk' - ntaw_llc = ntaw.local_link_connectivities.local_link_connectivity.add('500') - ntaw_llc.is_allowed = True - ntaw.name = '1-1-1-1-1' - ntaw._set_oper_status('up') - ntaw.protection_type = 'ietf-te-types:lsp-protection-unprotected' - ntaw.switching_capability = 'ietf-te-types:switching-otn' - elif network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: - if device_name in {'128.32.33.5'}: - connectivity_matrices = ietf_node_obj.te.te_node_attributes.connectivity_matrices - lr0 = connectivity_matrices.label_restrictions.label_restriction.add(0) - lr0.label_start.te_label.vlanid = 21 - lr0.label_end.te_label.vlanid = 21 - lr1 = connectivity_matrices.label_restrictions.label_restriction.add(1) - lr1.label_start.te_label.vlanid = 31 - lr1.label_end.te_label.vlanid = 31 diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeTermPoint.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeTermPoint.py deleted file mode 100644 index 9922e0470..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ComposeTermPoint.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging -from common.proto.context_pb2 import Device, EndPoint -from .bindings.networks.network.node.termination_point import termination_point -from .NameMapping import NameMappings -from .NetworkTypeEnum import NetworkTypeEnum - -MAPPINGS_TE_NAME = { - (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.10.1', '200'): '1-1-1-1-1', - (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.10.1', '500'): '1-1-1-1-1', - (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.10.1', '501'): '1-1-1-1-1', - - (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.20.1', '500'): '1-1-1-1-1', - (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.20.1', '501'): '1-1-1-1-1', - - (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.30.1', '200'): '1-1-1-1-1', - (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.30.1', '500'): '1-1-1-1-1', - (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.30.1', '501'): '1-1-1-1-1', - - (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.40.1', '500'): '1-1-1-1-1', - (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.40.1', '501'): '1-1-1-1-1', - - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.10.1', '200'): 'endpoint:111', - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.10.1', '500'): 'endpoint:111', - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.10.1', '501'): 'endpoint:111', - - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.20.1', '500'): 'endpoint:111', - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.20.1', '501'): 'endpoint:111', - - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.30.1', '200'): 'endpoint:111', - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.30.1', '500'): 'endpoint:111', - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.30.1', '501'): 'endpoint:111', - - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.40.1', '500'): 'endpoint:111', - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.40.1', '501'): 'endpoint:111', - - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '128.32.33.5', '500') : 'endpoint:111', -} - -MAPPINGS_TE_TP_ID = { - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.10.1', '200'): '128.32.33.254', - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.30.1', '200'): '172.10.33.254', - - (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '128.32.33.5', '500') : '128.32.33.2', -} - -LOGGER = logging.getLogger(__name__) - -def compose_term_point( - ietf_tp_obj : termination_point, device : Device, endpoint : EndPoint, name_mappings : NameMappings, - network_type : NetworkTypeEnum -) -> None: - name_mappings.store_endpoint_name(device, endpoint) - - device_name = device.name - endpoint_name = endpoint.name - - ietf_tp_obj.te_tp_id = MAPPINGS_TE_TP_ID.get((network_type, device_name, endpoint_name), endpoint_name) - - if (network_type, device_name, endpoint_name) in MAPPINGS_TE_NAME: - ietf_tp_obj.te._set_oper_status('up') - ietf_tp_obj.te.admin_status = 'up' - ietf_tp_obj.te.name = MAPPINGS_TE_NAME.get((network_type, device_name, endpoint_name), endpoint_name) - - if network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: - if (network_type, device_name, endpoint_name) in MAPPINGS_TE_NAME: - ietf_if_sw_cap = ietf_tp_obj.te.interface_switching_capability.add( - 'ietf-te-types:switching-l2sc ietf-te-types:lsp-encoding-ethernet' - ) - ietf_max_lsp_bw = ietf_if_sw_cap.max_lsp_bandwidth.add('7') - ietf_max_lsp_bw.te_bandwidth.eth_bandwidth = 10_000_000 # Kbps - - #ietf_tp_obj.eth_svc.client_facing = True - - ietf_tp_obj.eth_svc.supported_classification.port_classification = True - outer_tag = ietf_tp_obj.eth_svc.supported_classification.vlan_classification.outer_tag - outer_tag.supported_tag_types.append('ietf-eth-tran-types:classify-c-vlan') - outer_tag.supported_tag_types.append('ietf-eth-tran-types:classify-s-vlan') - outer_tag.vlan_bundling = False - outer_tag.vlan_range = '1-4094' - - elif network_type == NetworkTypeEnum.TE_OTN_TOPOLOGY: - #ietf_tp_obj.te.client_svc.client_facing = False - - ietf_if_sw_cap = ietf_tp_obj.te.interface_switching_capability.add( - 'ietf-te-types:switching-otn ietf-te-types:lsp-encoding-oduk' - ) - ietf_max_lsp_bw = ietf_if_sw_cap.max_lsp_bandwidth.add('7') - ietf_max_lsp_bw.te_bandwidth.otn.odu_type = 'ietf-layer1-types:ODU4' diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ManualFixes.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ManualFixes.py deleted file mode 100644 index 803d2bd09..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/ManualFixes.py +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from typing import Dict - -from .NetworkTypeEnum import NetworkTypeEnum - -def manual_fixes(json_response : Dict) -> None: - # TODO: workaround to set network types manually. Currently does not work; refine bindings. - # Seems limitation of pyangbind using multiple augmentations and nested empty containers. - for json_network in json_response['ietf-network:networks']['network']: - net_te_topo_id = json_network.get('ietf-te-topology:te-topology-identifier', {}).get('topology-id') - if net_te_topo_id is None: continue - net_te_topo_type = json_network['network-types']['ietf-te-topology:te-topology'] - if net_te_topo_id == '1': - network_type = NetworkTypeEnum.TE_OTN_TOPOLOGY - net_te_topo_type['ietf-otn-topology:otn-topology'] = {} - elif net_te_topo_id == '2': - network_type = NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY - net_te_topo_type['ietf-eth-te-topology:eth-tran-topology'] = {} - else: - network_type = None - - for json_node in json_network.get('node', []): - for json_tp in json_node.get('ietf-network-topology:termination-point', []): - json_tp_te = json_tp.get('ietf-te-topology:te', {}) - - if network_type == NetworkTypeEnum.TE_OTN_TOPOLOGY: - json_tp_te_cs = json_tp_te.setdefault('ietf-otn-topology:client-svc', {}) - json_tp_te_cs['client-facing'] = False - elif network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: - if 'ietf-eth-te-topology:eth-svc' in json_tp: - client_facing = json_tp['tp-id'] in {'200', '201'} - json_tp['ietf-eth-te-topology:eth-svc']['client-facing'] = client_facing - - # Fix value type of bandwidth - for json_if_sw_cap in json_tp_te.get('interface-switching-capability', []): - for json_max_lsp_bandwidth in json_if_sw_cap.get('max-lsp-bandwidth', []): - json_te_bw = json_max_lsp_bandwidth.get('te-bandwidth', {}) - if network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: - if 'ietf-eth-te-topology:eth-bandwidth' in json_te_bw: - eth_bw = json_te_bw['ietf-eth-te-topology:eth-bandwidth'] - if isinstance(eth_bw, str): - json_te_bw['ietf-eth-te-topology:eth-bandwidth'] = int(eth_bw) - - for json_link in json_network.get('ietf-network-topology:link', []): - json_link_te_attributes = json_link.get('ietf-te-topology:te', {}).get('te-link-attributes', {}) - - # Fix value type of bandwidth - json_te_bw = json_link_te_attributes.get('max-link-bandwidth', {}).get('te-bandwidth', {}) - if network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: - if 'ietf-eth-te-topology:eth-bandwidth' in json_te_bw: - eth_bw = json_te_bw['ietf-eth-te-topology:eth-bandwidth'] - if isinstance(eth_bw, str): - json_te_bw['ietf-eth-te-topology:eth-bandwidth'] = int(eth_bw) - - for json_unresv_bandwidth in json_link_te_attributes.get('unreserved-bandwidth', []): - json_te_bw = json_unresv_bandwidth.get('te-bandwidth', {}) - if 'ietf-eth-te-topology:eth-bandwidth' in json_te_bw: - eth_bw = json_te_bw['ietf-eth-te-topology:eth-bandwidth'] - if isinstance(eth_bw, str): - json_te_bw['ietf-eth-te-topology:eth-bandwidth'] = int(eth_bw) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/Networks.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/Networks.py index e2ac05307..253338eac 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/Networks.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/Networks.py @@ -25,9 +25,6 @@ from common.tools.object_factory.Context import json_context_id from context.client.ContextClient import ContextClient from nbi.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH from nbi.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_OK, HTTP_SERVERERROR -from .bindings import ietf_network -from .ComposeNetwork import compose_network -from .ManualFixes import manual_fixes from .YangHandler import YangHandler LOGGER = logging.getLogger(__name__) @@ -53,31 +50,7 @@ class Networks(Resource): try: context_client = ContextClient() - if USE_RENDERER == Renderer.PYANGBIND.value: - #target = get_slice_by_uuid(context_client, vpn_id, rw_copy=True) - #if target is None: - # raise Exception('VPN({:s}) not found in database'.format(str(vpn_id))) - - ietf_nets = ietf_network() - - topology_details = get_topology_details( - context_client, DEFAULT_TOPOLOGY_NAME, context_uuid=DEFAULT_CONTEXT_NAME, - #rw_copy=True - ) - if topology_details is None: - MSG = 'Topology({:s}/{:s}) not found' - raise Exception(MSG.format(DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME)) - - for te_topology_name in TE_TOPOLOGY_NAMES: - ietf_net = ietf_nets.networks.network.add(te_topology_name) - compose_network(ietf_net, te_topology_name, topology_details) - - # TODO: improve these workarounds to enhance performance - json_response = json.loads(pybindJSON.dumps(ietf_nets, mode='ietf')) - - # Workaround; pyangbind does not allow to set otn_topology / eth-tran-topology - manual_fixes(json_response) - elif USE_RENDERER == Renderer.LIBYANG.value: + if USE_RENDERER == Renderer.LIBYANG.value: yang_handler = YangHandler() json_response = [] diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/SAP_Topology.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/SAP_Topology.py index ef38a6710..98445a76b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/SAP_Topology.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/SAP_Topology.py @@ -25,9 +25,6 @@ from common.tools.object_factory.Context import json_context_id from context.client.ContextClient import ContextClient from nbi.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH from nbi.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_OK, HTTP_SERVERERROR -from .bindings import ietf_network -from .ComposeNetwork import compose_network -from .ManualFixes import manual_fixes from .YangHandler import YangHandler LOGGER = logging.getLogger(__name__) @@ -53,31 +50,8 @@ class SAP_Topology(Resource): try: context_client = ContextClient() - if USE_RENDERER == Renderer.PYANGBIND.value: - #target = get_slice_by_uuid(context_client, vpn_id, rw_copy=True) - #if target is None: - # raise Exception('VPN({:s}) not found in database'.format(str(vpn_id))) - - ietf_nets = ietf_network() - - topology_details = get_topology_details( - context_client, DEFAULT_TOPOLOGY_NAME, context_uuid=DEFAULT_CONTEXT_NAME, - #rw_copy=True - ) - if topology_details is None: - MSG = 'Topology({:s}/{:s}) not found' - raise Exception(MSG.format(DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME)) - - for te_topology_name in TE_TOPOLOGY_NAMES: - ietf_net = ietf_nets.networks.network.add(te_topology_name) - compose_network(ietf_net, te_topology_name, topology_details) - - # TODO: improve these workarounds to enhance performance - json_response = json.loads(pybindJSON.dumps(ietf_nets, mode='ietf')) - - # Workaround; pyangbind does not allow to set otn_topology / eth-tran-topology - manual_fixes(json_response) - elif USE_RENDERER == Renderer.LIBYANG.value: + + if USE_RENDERER == Renderer.LIBYANG.value: yang_handler = YangHandler() json_response = [] diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/__init__.py deleted file mode 100644 index 6df50e1a6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/__init__.py +++ /dev/null @@ -1,256 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ietf_network_topology(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network-topology - based on the path /ietf-network-topology. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This module defines a common base model for a network topology, -augmenting the base network data model with links to connect -nodes, as well as termination points to terminate links -on nodes. - -Copyright (c) 2018 IETF Trust and the persons identified as -authors of the code. All rights reserved. - -Redistribution and use in source and binary forms, with or -without modification, is permitted pursuant to, and subject -to the license terms contained in, the Simplified BSD License -set forth in Section 4.c of the IETF Trust's Legal Provisions -Relating to IETF Documents -(https://trustee.ietf.org/license-info). - -This version of this YANG module is part of RFC 8345; -see the RFC itself for full legal notices. - """ - _pyangbind_elements = {} - - - -from . import networks -class ietf_network(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /ietf-network. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This module defines a common base data model for a collection -of nodes in a network. Node definitions are further used -in network topologies and inventories. - -Copyright (c) 2018 IETF Trust and the persons identified as -authors of the code. All rights reserved. - -Redistribution and use in source and binary forms, with or -without modification, is permitted pursuant to, and subject -to the license terms contained in, the Simplified BSD License -set forth in Section 4.c of the IETF Trust's Legal Provisions -Relating to IETF Documents -(https://trustee.ietf.org/license-info). - -This version of this YANG module is part of RFC 8345; -see the RFC itself for full legal notices. - """ - __slots__ = ('_path_helper', '_extmethods', '__networks',) - - _yang_name = 'ietf-network' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__networks = YANGDynClass(base=networks.networks, is_container='container', yang_name="networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', 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 [] - - def _get_networks(self): - """ - Getter method for networks, mapped from YANG variable /networks (container) - - YANG Description: Serves as a top-level container for a list of networks. - """ - return self.__networks - - def _set_networks(self, v, load=False): - """ - Setter method for networks, mapped from YANG variable /networks (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_networks is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_networks() directly. - - YANG Description: Serves as a top-level container for a list of networks. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=networks.networks, is_container='container', yang_name="networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """networks must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=networks.networks, is_container='container', yang_name="networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True)""", - }) - - self.__networks = t - if hasattr(self, '_set'): - self._set() - - def _unset_networks(self): - self.__networks = YANGDynClass(base=networks.networks, is_container='container', yang_name="networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True) - - networks = __builtin__.property(_get_networks, _set_networks) - - - _pyangbind_elements = OrderedDict([('networks', networks), ]) - - -class ietf_te_topology(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-te-topology - based on the path /ietf-te-topology. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This YANG module defines a TE topology model for representing, -retrieving, and manipulating technology-agnostic TE topologies. - -Copyright (c) 2020 IETF Trust and the persons identified as -authors of the code. All rights reserved. - -Redistribution and use in source and binary forms, with or -without modification, is permitted pursuant to, and subject to -the license terms contained in, the Simplified BSD License set -forth in Section 4.c of the IETF Trust's Legal Provisions -Relating to IETF Documents -(https://trustee.ietf.org/license-info). - -This version of this YANG module is part of RFC 8795; see the -RFC itself for full legal notices. - """ - _pyangbind_elements = {} - - - -class ietf_otn_topology(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-otn-topology - based on the path /ietf-otn-topology. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This module defines a protocol independent Layer 1/ODU topology -data model. The model fully conforms -to the Network Management Datastore Architecture (NMDA). - -Copyright (c) 2023 IETF Trust and the persons identified -as authors of the code. All rights reserved. - -Redistribution and use in source and binary forms, with or -without modification, is permitted pursuant to, and subject -to the license terms contained in, the Revised BSD License -set forth in Section 4.c of the IETF Trust's Legal Provisions -Relating to IETF Documents -(https://trustee.ietf.org/license-info). - -This version of this YANG module is part of RFC XXXX; see -the RFC itself for full legal notices. - -The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL -NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', -'MAY', and 'OPTIONAL' in this document are to be interpreted as -described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, -they appear in all capitals, as shown here. - """ - _pyangbind_elements = {} - - - -class ietf_eth_te_topology(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-eth-te-topology - based on the path /ietf-eth-te-topology. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This module defines a YANG data model for describing -layer-2 Ethernet transport topologies. The model fully -conforms to the Network Management Datastore -Architecture (NMDA). - -Copyright (c) 2023 IETF Trust and the persons identified -as authors of the code. All rights reserved. - -Redistribution and use in source and binary forms, with or -without modification, is permitted pursuant to, and subject -to the license terms contained in, the Revised BSD License -set forth in Section 4.c of the IETF Trust's Legal Provisions -Relating to IETF Documents -(https://trustee.ietf.org/license-info). - -This version of this YANG module is part of RFC XXXX; see -the RFC itself for full legal notices. - -The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL -NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', -'MAY', and 'OPTIONAL' in this document are to be interpreted as -described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, -they appear in all capitals, as shown here. - """ - _pyangbind_elements = {} - - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/__init__.py deleted file mode 100644 index 0c52044eb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import network -from . import te -class networks(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Serves as a top-level container for a list of networks. - """ - __slots__ = ('_path_helper', '_extmethods', '__network','__te',) - - _yang_name = 'networks' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network = YANGDynClass(base=YANGListType("network_id",network.network, yang_name="network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-id', extensions=None), is_container='list', yang_name="network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) - self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks'] - - def _get_network(self): - """ - Getter method for network, mapped from YANG variable /networks/network (list) - - YANG Description: Describes a network. -A network typically contains an inventory of nodes, -topological information (augmented through the -network-topology data model), and layering information. - """ - return self.__network - - def _set_network(self, v, load=False): - """ - Setter method for network, mapped from YANG variable /networks/network (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_network is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network() directly. - - YANG Description: Describes a network. -A network typically contains an inventory of nodes, -topological information (augmented through the -network-topology data model), and layering information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("network_id",network.network, yang_name="network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-id', extensions=None), is_container='list', yang_name="network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("network_id",network.network, yang_name="network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-id', extensions=None), is_container='list', yang_name="network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True)""", - }) - - self.__network = t - if hasattr(self, '_set'): - self._set() - - def _unset_network(self): - self.__network = YANGDynClass(base=YANGListType("network_id",network.network, yang_name="network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-id', extensions=None), is_container='list', yang_name="network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) - - - def _get_te(self): - """ - Getter method for te, mapped from YANG variable /networks/te (container) - - YANG Description: Indicates TE support. - """ - return self.__te - - def _set_te(self, v, load=False): - """ - Setter method for te, mapped from YANG variable /networks/te (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te() directly. - - YANG Description: Indicates TE support. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te = t - if hasattr(self, '_set'): - self._set() - - def _unset_te(self): - self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - network = __builtin__.property(_get_network, _set_network) - te = __builtin__.property(_get_te, _set_te) - - - _pyangbind_elements = OrderedDict([('network', network), ('te', te), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/__init__.py deleted file mode 100644 index 302af85c9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/__init__.py +++ /dev/null @@ -1,385 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import network_types -from . import supporting_network -from . import node -from . import link -from . import te_topology_identifier -from . import te -class network(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Describes a network. -A network typically contains an inventory of nodes, -topological information (augmented through the -network-topology data model), and layering information. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_id','__network_types','__supporting_network','__node','__link','__te_topology_identifier','__te',) - - _yang_name = 'network' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='network-id', is_config=True) - self.__network_types = YANGDynClass(base=network_types.network_types, is_container='container', yang_name="network-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True) - self.__supporting_network = YANGDynClass(base=YANGListType("network_ref",supporting_network.supporting_network, yang_name="supporting-network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref', extensions=None), is_container='list', yang_name="supporting-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) - self.__node = YANGDynClass(base=YANGListType("node_id",node.node, yang_name="node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-id', extensions=None), is_container='list', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) - self.__link = YANGDynClass(base=YANGListType("link_id",link.link, yang_name="link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-id', extensions=None), is_container='list', yang_name="link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) - self.__te_topology_identifier = YANGDynClass(base=te_topology_identifier.te_topology_identifier, is_container='container', yang_name="te-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network'] - - def _get_network_id(self): - """ - Getter method for network_id, mapped from YANG variable /networks/network/network_id (network-id) - - YANG Description: Identifies a network. - """ - return self.__network_id - - def _set_network_id(self, v, load=False): - """ - Setter method for network_id, mapped from YANG variable /networks/network/network_id (network-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_id() directly. - - YANG Description: Identifies a network. - """ - 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=six.text_type, is_leaf=True, yang_name="network-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='network-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_id must be of a type compatible with network-id""", - 'defined-type': "ietf-network:network-id", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='network-id', is_config=True)""", - }) - - self.__network_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_id(self): - self.__network_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='network-id', is_config=True) - - - def _get_network_types(self): - """ - Getter method for network_types, mapped from YANG variable /networks/network/network_types (container) - - YANG Description: Serves as an augmentation target. -The network type is indicated through corresponding -presence containers augmented into this container. - """ - return self.__network_types - - def _set_network_types(self, v, load=False): - """ - Setter method for network_types, mapped from YANG variable /networks/network/network_types (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_types is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_types() directly. - - YANG Description: Serves as an augmentation target. -The network type is indicated through corresponding -presence containers augmented into this container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=network_types.network_types, is_container='container', yang_name="network-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_types must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=network_types.network_types, is_container='container', yang_name="network-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True)""", - }) - - self.__network_types = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_types(self): - self.__network_types = YANGDynClass(base=network_types.network_types, is_container='container', yang_name="network-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True) - - - def _get_supporting_network(self): - """ - Getter method for supporting_network, mapped from YANG variable /networks/network/supporting_network (list) - - YANG Description: An underlay network, used to represent layered network -topologies. - """ - return self.__supporting_network - - def _set_supporting_network(self, v, load=False): - """ - Setter method for supporting_network, mapped from YANG variable /networks/network/supporting_network (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_supporting_network is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_supporting_network() directly. - - YANG Description: An underlay network, used to represent layered network -topologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("network_ref",supporting_network.supporting_network, yang_name="supporting-network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref', extensions=None), is_container='list', yang_name="supporting-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """supporting_network must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("network_ref",supporting_network.supporting_network, yang_name="supporting-network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref', extensions=None), is_container='list', yang_name="supporting-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True)""", - }) - - self.__supporting_network = t - if hasattr(self, '_set'): - self._set() - - def _unset_supporting_network(self): - self.__supporting_network = YANGDynClass(base=YANGListType("network_ref",supporting_network.supporting_network, yang_name="supporting-network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref', extensions=None), is_container='list', yang_name="supporting-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) - - - def _get_node(self): - """ - Getter method for node, mapped from YANG variable /networks/network/node (list) - - YANG Description: The inventory of nodes of this network. - """ - return self.__node - - def _set_node(self, v, load=False): - """ - Setter method for node, mapped from YANG variable /networks/network/node (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_node is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node() directly. - - YANG Description: The inventory of nodes of this network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("node_id",node.node, yang_name="node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-id', extensions=None), is_container='list', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("node_id",node.node, yang_name="node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-id', extensions=None), is_container='list', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True)""", - }) - - self.__node = t - if hasattr(self, '_set'): - self._set() - - def _unset_node(self): - self.__node = YANGDynClass(base=YANGListType("node_id",node.node, yang_name="node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-id', extensions=None), is_container='list', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) - - - def _get_link(self): - """ - Getter method for link, mapped from YANG variable /networks/network/link (list) - - YANG Description: A network link connects a local (source) node and -a remote (destination) node via a set of the respective -node's termination points. It is possible to have several -links between the same source and destination nodes. -Likewise, a link could potentially be re-homed between -termination points. Therefore, in order to ensure that we -would always know to distinguish between links, every link -is identified by a dedicated link identifier. Note that a -link models a point-to-point link, not a multipoint link. - """ - return self.__link - - def _set_link(self, v, load=False): - """ - Setter method for link, mapped from YANG variable /networks/network/link (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_link is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link() directly. - - YANG Description: A network link connects a local (source) node and -a remote (destination) node via a set of the respective -node's termination points. It is possible to have several -links between the same source and destination nodes. -Likewise, a link could potentially be re-homed between -termination points. Therefore, in order to ensure that we -would always know to distinguish between links, every link -is identified by a dedicated link identifier. Note that a -link models a point-to-point link, not a multipoint link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("link_id",link.link, yang_name="link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-id', extensions=None), is_container='list', yang_name="link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("link_id",link.link, yang_name="link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-id', extensions=None), is_container='list', yang_name="link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True)""", - }) - - self.__link = t - if hasattr(self, '_set'): - self._set() - - def _unset_link(self): - self.__link = YANGDynClass(base=YANGListType("link_id",link.link, yang_name="link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-id', extensions=None), is_container='list', yang_name="link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) - - - def _get_te_topology_identifier(self): - """ - Getter method for te_topology_identifier, mapped from YANG variable /networks/network/te_topology_identifier (container) - - YANG Description: TE topology identifier container. - """ - return self.__te_topology_identifier - - def _set_te_topology_identifier(self, v, load=False): - """ - Setter method for te_topology_identifier, mapped from YANG variable /networks/network/te_topology_identifier (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_topology_identifier is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_topology_identifier() directly. - - YANG Description: TE topology identifier container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_topology_identifier.te_topology_identifier, is_container='container', yang_name="te-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_topology_identifier must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_topology_identifier.te_topology_identifier, is_container='container', yang_name="te-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_topology_identifier = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_topology_identifier(self): - self.__te_topology_identifier = YANGDynClass(base=te_topology_identifier.te_topology_identifier, is_container='container', yang_name="te-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_te(self): - """ - Getter method for te, mapped from YANG variable /networks/network/te (container) - - YANG Description: Indicates TE support. - """ - return self.__te - - def _set_te(self, v, load=False): - """ - Setter method for te, mapped from YANG variable /networks/network/te (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te() directly. - - YANG Description: Indicates TE support. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te = t - if hasattr(self, '_set'): - self._set() - - def _unset_te(self): - self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - network_id = __builtin__.property(_get_network_id, _set_network_id) - network_types = __builtin__.property(_get_network_types, _set_network_types) - supporting_network = __builtin__.property(_get_supporting_network, _set_supporting_network) - node = __builtin__.property(_get_node, _set_node) - link = __builtin__.property(_get_link, _set_link) - te_topology_identifier = __builtin__.property(_get_te_topology_identifier, _set_te_topology_identifier) - te = __builtin__.property(_get_te, _set_te) - - - _pyangbind_elements = OrderedDict([('network_id', network_id), ('network_types', network_types), ('supporting_network', supporting_network), ('node', node), ('link', link), ('te_topology_identifier', te_topology_identifier), ('te', te), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/__init__.py deleted file mode 100644 index 91937b156..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/__init__.py +++ /dev/null @@ -1,294 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import source -from . import destination -from . import supporting_link -from . import te -class link(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A network link connects a local (source) node and -a remote (destination) node via a set of the respective -node's termination points. It is possible to have several -links between the same source and destination nodes. -Likewise, a link could potentially be re-homed between -termination points. Therefore, in order to ensure that we -would always know to distinguish between links, every link -is identified by a dedicated link identifier. Note that a -link models a point-to-point link, not a multipoint link. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_id','__source','__destination','__supporting_link','__te',) - - _yang_name = 'link' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='link-id', is_config=True) - self.__source = YANGDynClass(base=source.source, is_container='container', yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True) - self.__destination = YANGDynClass(base=destination.destination, is_container='container', yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True) - self.__supporting_link = YANGDynClass(base=YANGListType("network_ref link_ref",supporting_link.supporting_link, yang_name="supporting-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref link-ref', extensions=None), is_container='list', yang_name="supporting-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) - self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link'] - - def _get_link_id(self): - """ - Getter method for link_id, mapped from YANG variable /networks/network/link/link_id (link-id) - - YANG Description: The identifier of a link in the topology. -A link is specific to a topology to which it belongs. - """ - return self.__link_id - - def _set_link_id(self, v, load=False): - """ - Setter method for link_id, mapped from YANG variable /networks/network/link/link_id (link-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_id() directly. - - YANG Description: The identifier of a link in the topology. -A link is specific to a topology to which it belongs. - """ - 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=six.text_type, is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='link-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_id must be of a type compatible with link-id""", - 'defined-type': "ietf-network-topology:link-id", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='link-id', is_config=True)""", - }) - - self.__link_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_id(self): - self.__link_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='link-id', is_config=True) - - - def _get_source(self): - """ - Getter method for source, mapped from YANG variable /networks/network/link/source (container) - - YANG Description: This container holds the logical source of a particular -link. - """ - return self.__source - - def _set_source(self, v, load=False): - """ - Setter method for source, mapped from YANG variable /networks/network/link/source (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_source is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_source() directly. - - YANG Description: This container holds the logical source of a particular -link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=source.source, is_container='container', yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """source must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=source.source, is_container='container', yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True)""", - }) - - self.__source = t - if hasattr(self, '_set'): - self._set() - - def _unset_source(self): - self.__source = YANGDynClass(base=source.source, is_container='container', yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True) - - - def _get_destination(self): - """ - Getter method for destination, mapped from YANG variable /networks/network/link/destination (container) - - YANG Description: This container holds the logical destination of a -particular link. - """ - return self.__destination - - def _set_destination(self, v, load=False): - """ - Setter method for destination, mapped from YANG variable /networks/network/link/destination (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_destination is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_destination() directly. - - YANG Description: This container holds the logical destination of a -particular link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=destination.destination, is_container='container', yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """destination must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=destination.destination, is_container='container', yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True)""", - }) - - self.__destination = t - if hasattr(self, '_set'): - self._set() - - def _unset_destination(self): - self.__destination = YANGDynClass(base=destination.destination, is_container='container', yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True) - - - def _get_supporting_link(self): - """ - Getter method for supporting_link, mapped from YANG variable /networks/network/link/supporting_link (list) - - YANG Description: Identifies the link or links on which this link depends. - """ - return self.__supporting_link - - def _set_supporting_link(self, v, load=False): - """ - Setter method for supporting_link, mapped from YANG variable /networks/network/link/supporting_link (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_supporting_link is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_supporting_link() directly. - - YANG Description: Identifies the link or links on which this link depends. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("network_ref link_ref",supporting_link.supporting_link, yang_name="supporting-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref link-ref', extensions=None), is_container='list', yang_name="supporting-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """supporting_link must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("network_ref link_ref",supporting_link.supporting_link, yang_name="supporting-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref link-ref', extensions=None), is_container='list', yang_name="supporting-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True)""", - }) - - self.__supporting_link = t - if hasattr(self, '_set'): - self._set() - - def _unset_supporting_link(self): - self.__supporting_link = YANGDynClass(base=YANGListType("network_ref link_ref",supporting_link.supporting_link, yang_name="supporting-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref link-ref', extensions=None), is_container='list', yang_name="supporting-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) - - - def _get_te(self): - """ - Getter method for te, mapped from YANG variable /networks/network/link/te (container) - - YANG Description: Indicates TE support. - """ - return self.__te - - def _set_te(self, v, load=False): - """ - Setter method for te, mapped from YANG variable /networks/network/link/te (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te() directly. - - YANG Description: Indicates TE support. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te = t - if hasattr(self, '_set'): - self._set() - - def _unset_te(self): - self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - link_id = __builtin__.property(_get_link_id, _set_link_id) - source = __builtin__.property(_get_source, _set_source) - destination = __builtin__.property(_get_destination, _set_destination) - supporting_link = __builtin__.property(_get_supporting_link, _set_supporting_link) - te = __builtin__.property(_get_te, _set_te) - - - _pyangbind_elements = OrderedDict([('link_id', link_id), ('source', source), ('destination', destination), ('supporting_link', supporting_link), ('te', te), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/destination/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/destination/__init__.py deleted file mode 100644 index ddab21c3e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/destination/__init__.py +++ /dev/null @@ -1,159 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class destination(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/destination. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This container holds the logical destination of a -particular link. - """ - __slots__ = ('_path_helper', '_extmethods', '__dest_node','__dest_tp',) - - _yang_name = 'destination' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__dest_node = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dest-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - self.__dest_tp = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dest-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', 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 ['networks', 'network', 'link', 'destination'] - - def _get_dest_node(self): - """ - Getter method for dest_node, mapped from YANG variable /networks/network/link/destination/dest_node (leafref) - - YANG Description: Destination node identifier. Must be in the same -network. - """ - return self.__dest_node - - def _set_dest_node(self, v, load=False): - """ - Setter method for dest_node, mapped from YANG variable /networks/network/link/destination/dest_node (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_dest_node is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_dest_node() directly. - - YANG Description: Destination node identifier. Must be in the same -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="dest-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """dest_node must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dest-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", - }) - - self.__dest_node = t - if hasattr(self, '_set'): - self._set() - - def _unset_dest_node(self): - self.__dest_node = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dest-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - - - def _get_dest_tp(self): - """ - Getter method for dest_tp, mapped from YANG variable /networks/network/link/destination/dest_tp (leafref) - - YANG Description: This termination point is located within the -destination node and terminates the link. - """ - return self.__dest_tp - - def _set_dest_tp(self, v, load=False): - """ - Setter method for dest_tp, mapped from YANG variable /networks/network/link/destination/dest_tp (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_dest_tp is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_dest_tp() directly. - - YANG Description: This termination point is located within the -destination node and terminates the link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="dest-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """dest_tp must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dest-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", - }) - - self.__dest_tp = t - if hasattr(self, '_set'): - self._set() - - def _unset_dest_tp(self): - self.__dest_tp = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dest-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - - dest_node = __builtin__.property(_get_dest_node, _set_dest_node) - dest_tp = __builtin__.property(_get_dest_tp, _set_dest_tp) - - - _pyangbind_elements = OrderedDict([('dest_node', dest_node), ('dest_tp', dest_tp), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/source/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/source/__init__.py deleted file mode 100644 index 7538dfd44..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/source/__init__.py +++ /dev/null @@ -1,157 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class source(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/source. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This container holds the logical source of a particular -link. - """ - __slots__ = ('_path_helper', '_extmethods', '__source_node','__source_tp',) - - _yang_name = 'source' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__source_node = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - self.__source_tp = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', 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 ['networks', 'network', 'link', 'source'] - - def _get_source_node(self): - """ - Getter method for source_node, mapped from YANG variable /networks/network/link/source/source_node (leafref) - - YANG Description: Source node identifier. Must be in the same topology. - """ - return self.__source_node - - def _set_source_node(self, v, load=False): - """ - Setter method for source_node, mapped from YANG variable /networks/network/link/source/source_node (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_source_node is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_source_node() directly. - - YANG Description: Source node identifier. Must be in the same topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """source_node must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", - }) - - self.__source_node = t - if hasattr(self, '_set'): - self._set() - - def _unset_source_node(self): - self.__source_node = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - - - def _get_source_tp(self): - """ - Getter method for source_tp, mapped from YANG variable /networks/network/link/source/source_tp (leafref) - - YANG Description: This termination point is located within the source node -and terminates the link. - """ - return self.__source_tp - - def _set_source_tp(self, v, load=False): - """ - Setter method for source_tp, mapped from YANG variable /networks/network/link/source/source_tp (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_source_tp is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_source_tp() directly. - - YANG Description: This termination point is located within the source node -and terminates the link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """source_tp must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", - }) - - self.__source_tp = t - if hasattr(self, '_set'): - self._set() - - def _unset_source_tp(self): - self.__source_tp = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - - source_node = __builtin__.property(_get_source_node, _set_source_node) - source_tp = __builtin__.property(_get_source_tp, _set_source_tp) - - - _pyangbind_elements = OrderedDict([('source_node', source_node), ('source_tp', source_tp), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/supporting_link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/supporting_link/__init__.py deleted file mode 100644 index 28a780f5f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/supporting_link/__init__.py +++ /dev/null @@ -1,172 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class supporting_link(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/supporting-link. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Identifies the link or links on which this link depends. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref','__link_ref',) - - _yang_name = 'supporting-link' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - self.__link_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', 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 ['networks', 'network', 'link', 'supporting-link'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/link/supporting_link/network_ref (leafref) - - YANG Description: This leaf identifies in which underlay topology -the supporting link is present. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/link/supporting_link/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: This leaf identifies in which underlay topology -the supporting link is present. - """ - 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=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - - - def _get_link_ref(self): - """ - Getter method for link_ref, mapped from YANG variable /networks/network/link/supporting_link/link_ref (leafref) - - YANG Description: This leaf identifies a link that is a part -of this link's underlay. Reference loops in which -a link identifies itself as its underlay, either -directly or transitively, are not allowed. - """ - return self.__link_ref - - def _set_link_ref(self, v, load=False): - """ - Setter method for link_ref, mapped from YANG variable /networks/network/link/supporting_link/link_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_ref() directly. - - YANG Description: This leaf identifies a link that is a part -of this link's underlay. Reference loops in which -a link identifies itself as its underlay, either -directly or transitively, are not allowed. - """ - 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=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", - }) - - self.__link_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_ref(self): - self.__link_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - link_ref = __builtin__.property(_get_link_ref, _set_link_ref) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('link_ref', link_ref), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/__init__.py deleted file mode 100644 index 666d97181..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/__init__.py +++ /dev/null @@ -1,603 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import bundled_links -from . import component_links -from . import te_link_attributes -from . import information_source_state -from . import information_source_entry -from . import recovery -from . import underlay -from . import statistics -class te(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Indicates TE support. - """ - __slots__ = ('_path_helper', '_extmethods', '__bundled_links','__component_links','__te_link_template','__te_link_attributes','__oper_status','__is_transitional','__information_source','__information_source_instance','__information_source_state','__information_source_entry','__recovery','__underlay','__statistics',) - - _yang_name = 'te' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__bundled_links = YANGDynClass(base=bundled_links.bundled_links, is_container='container', yang_name="bundled-links", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__component_links = YANGDynClass(base=component_links.component_links, is_container='container', yang_name="component-links", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__te_link_template = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__te_link_attributes = YANGDynClass(base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) - self.__is_transitional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-transitional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) - self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) - self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__information_source_entry = YANGDynClass(base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__recovery = YANGDynClass(base=recovery.recovery, is_container='container', yang_name="recovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'link', 'te'] - - def _get_bundled_links(self): - """ - Getter method for bundled_links, mapped from YANG variable /networks/network/link/te/bundled_links (container) - - YANG Description: A set of bundled links. - """ - return self.__bundled_links - - def _set_bundled_links(self, v, load=False): - """ - Setter method for bundled_links, mapped from YANG variable /networks/network/link/te/bundled_links (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_bundled_links is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_bundled_links() directly. - - YANG Description: A set of bundled links. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=bundled_links.bundled_links, is_container='container', yang_name="bundled-links", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """bundled_links must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=bundled_links.bundled_links, is_container='container', yang_name="bundled-links", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__bundled_links = t - if hasattr(self, '_set'): - self._set() - - def _unset_bundled_links(self): - self.__bundled_links = YANGDynClass(base=bundled_links.bundled_links, is_container='container', yang_name="bundled-links", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_component_links(self): - """ - Getter method for component_links, mapped from YANG variable /networks/network/link/te/component_links (container) - - YANG Description: A set of component links. - """ - return self.__component_links - - def _set_component_links(self, v, load=False): - """ - Setter method for component_links, mapped from YANG variable /networks/network/link/te/component_links (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_component_links is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_component_links() directly. - - YANG Description: A set of component links. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=component_links.component_links, is_container='container', yang_name="component-links", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """component_links must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=component_links.component_links, is_container='container', yang_name="component-links", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__component_links = t - if hasattr(self, '_set'): - self._set() - - def _unset_component_links(self): - self.__component_links = YANGDynClass(base=component_links.component_links, is_container='container', yang_name="component-links", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_te_link_template(self): - """ - Getter method for te_link_template, mapped from YANG variable /networks/network/link/te/te_link_template (leafref) - - YANG Description: The reference to a TE link template. - """ - return self.__te_link_template - - def _set_te_link_template(self, v, load=False): - """ - Setter method for te_link_template, mapped from YANG variable /networks/network/link/te/te_link_template (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_link_template is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_link_template() directly. - - YANG Description: The reference to a TE link template. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_link_template must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__te_link_template = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_link_template(self): - self.__te_link_template = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_te_link_attributes(self): - """ - Getter method for te_link_attributes, mapped from YANG variable /networks/network/link/te/te_link_attributes (container) - - YANG Description: Link attributes in a TE topology. - """ - return self.__te_link_attributes - - def _set_te_link_attributes(self, v, load=False): - """ - Setter method for te_link_attributes, mapped from YANG variable /networks/network/link/te/te_link_attributes (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_link_attributes is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_link_attributes() directly. - - YANG Description: Link attributes in a TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_link_attributes must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_link_attributes = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_link_attributes(self): - self.__te_link_attributes = YANGDynClass(base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_oper_status(self): - """ - Getter method for oper_status, mapped from YANG variable /networks/network/link/te/oper_status (te-types:te-oper-status) - - YANG Description: The current operational state of the link. - """ - return self.__oper_status - - def _set_oper_status(self, v, load=False): - """ - Setter method for oper_status, mapped from YANG variable /networks/network/link/te/oper_status (te-types:te-oper-status) - If this variable is read-only (config: false) in the - source YANG file, then _set_oper_status is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_oper_status() directly. - - YANG Description: The current operational state of the link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """oper_status must be of a type compatible with te-types:te-oper-status""", - 'defined-type': "te-types:te-oper-status", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False)""", - }) - - self.__oper_status = t - if hasattr(self, '_set'): - self._set() - - def _unset_oper_status(self): - self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) - - - def _get_is_transitional(self): - """ - Getter method for is_transitional, mapped from YANG variable /networks/network/link/te/is_transitional (empty) - - YANG Description: Present if the link is transitional; used as an -alternative approach in lieu of 'inter-layer-lock-id' -for path computation in a TE topology covering multiple -layers or multiple regions. - """ - return self.__is_transitional - - def _set_is_transitional(self, v, load=False): - """ - Setter method for is_transitional, mapped from YANG variable /networks/network/link/te/is_transitional (empty) - If this variable is read-only (config: false) in the - source YANG file, then _set_is_transitional is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_is_transitional() directly. - - YANG Description: Present if the link is transitional; used as an -alternative approach in lieu of 'inter-layer-lock-id' -for path computation in a TE topology covering multiple -layers or multiple regions. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-transitional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """is_transitional must be of a type compatible with empty""", - 'defined-type': "empty", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-transitional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False)""", - }) - - self.__is_transitional = t - if hasattr(self, '_set'): - self._set() - - def _unset_is_transitional(self): - self.__is_transitional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-transitional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) - - - def _get_information_source(self): - """ - Getter method for information_source, mapped from YANG variable /networks/network/link/te/information_source (te-info-source) - - YANG Description: Indicates the type of information source. - """ - return self.__information_source - - def _set_information_source(self, v, load=False): - """ - Setter method for information_source, mapped from YANG variable /networks/network/link/te/information_source (te-info-source) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source() directly. - - YANG Description: Indicates the type of information source. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source must be of a type compatible with te-info-source""", - 'defined-type': "ietf-te-topology:te-info-source", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False)""", - }) - - self.__information_source = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source(self): - self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) - - - def _get_information_source_instance(self): - """ - Getter method for information_source_instance, mapped from YANG variable /networks/network/link/te/information_source_instance (string) - - YANG Description: The name indicating the instance of the information -source. - """ - return self.__information_source_instance - - def _set_information_source_instance(self, v, load=False): - """ - Setter method for information_source_instance, mapped from YANG variable /networks/network/link/te/information_source_instance (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source_instance is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source_instance() directly. - - YANG Description: The name indicating the instance of the information -source. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source_instance must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__information_source_instance = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source_instance(self): - self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_information_source_state(self): - """ - Getter method for information_source_state, mapped from YANG variable /networks/network/link/te/information_source_state (container) - - YANG Description: Contains state attributes related to the information -source. - """ - return self.__information_source_state - - def _set_information_source_state(self, v, load=False): - """ - Setter method for information_source_state, mapped from YANG variable /networks/network/link/te/information_source_state (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source_state is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source_state() directly. - - YANG Description: Contains state attributes related to the information -source. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source_state must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__information_source_state = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source_state(self): - self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_information_source_entry(self): - """ - Getter method for information_source_entry, mapped from YANG variable /networks/network/link/te/information_source_entry (list) - - YANG Description: A list of information sources learned, including the source -that is used. - """ - return self.__information_source_entry - - def _set_information_source_entry(self, v, load=False): - """ - Setter method for information_source_entry, mapped from YANG variable /networks/network/link/te/information_source_entry (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source_entry is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source_entry() directly. - - YANG Description: A list of information sources learned, including the source -that is used. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source_entry must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__information_source_entry = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source_entry(self): - self.__information_source_entry = YANGDynClass(base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_recovery(self): - """ - Getter method for recovery, mapped from YANG variable /networks/network/link/te/recovery (container) - - YANG Description: Status of the recovery process. - """ - return self.__recovery - - def _set_recovery(self, v, load=False): - """ - Setter method for recovery, mapped from YANG variable /networks/network/link/te/recovery (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_recovery is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_recovery() directly. - - YANG Description: Status of the recovery process. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=recovery.recovery, is_container='container', yang_name="recovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """recovery must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=recovery.recovery, is_container='container', yang_name="recovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__recovery = t - if hasattr(self, '_set'): - self._set() - - def _unset_recovery(self): - self.__recovery = YANGDynClass(base=recovery.recovery, is_container='container', yang_name="recovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_underlay(self): - """ - Getter method for underlay, mapped from YANG variable /networks/network/link/te/underlay (container) - - YANG Description: State attributes for the TE link underlay. - """ - return self.__underlay - - def _set_underlay(self, v, load=False): - """ - Setter method for underlay, mapped from YANG variable /networks/network/link/te/underlay (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_underlay is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_underlay() directly. - - YANG Description: State attributes for the TE link underlay. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """underlay must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__underlay = t - if hasattr(self, '_set'): - self._set() - - def _unset_underlay(self): - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_statistics(self): - """ - Getter method for statistics, mapped from YANG variable /networks/network/link/te/statistics (container) - - YANG Description: Statistics data. - """ - return self.__statistics - - def _set_statistics(self, v, load=False): - """ - Setter method for statistics, mapped from YANG variable /networks/network/link/te/statistics (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_statistics is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_statistics() directly. - - YANG Description: Statistics data. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """statistics must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__statistics = t - if hasattr(self, '_set'): - self._set() - - def _unset_statistics(self): - self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - bundled_links = __builtin__.property(_get_bundled_links, _set_bundled_links) - component_links = __builtin__.property(_get_component_links, _set_component_links) - te_link_template = __builtin__.property(_get_te_link_template, _set_te_link_template) - te_link_attributes = __builtin__.property(_get_te_link_attributes, _set_te_link_attributes) - oper_status = __builtin__.property(_get_oper_status) - is_transitional = __builtin__.property(_get_is_transitional) - information_source = __builtin__.property(_get_information_source) - information_source_instance = __builtin__.property(_get_information_source_instance) - information_source_state = __builtin__.property(_get_information_source_state) - information_source_entry = __builtin__.property(_get_information_source_entry) - recovery = __builtin__.property(_get_recovery) - underlay = __builtin__.property(_get_underlay) - statistics = __builtin__.property(_get_statistics) - - __choices__ = {'bundle-stack-level': {'bundle': ['bundled_links'], 'component': ['component_links']}} - _pyangbind_elements = OrderedDict([('bundled_links', bundled_links), ('component_links', component_links), ('te_link_template', te_link_template), ('te_link_attributes', te_link_attributes), ('oper_status', oper_status), ('is_transitional', is_transitional), ('information_source', information_source), ('information_source_instance', information_source_instance), ('information_source_state', information_source_state), ('information_source_entry', information_source_entry), ('recovery', recovery), ('underlay', underlay), ('statistics', statistics), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/bundled_links/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/bundled_links/__init__.py deleted file mode 100644 index 890484652..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/bundled_links/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import bundled_link -class bundled_links(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/bundled-links. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A set of bundled links. - """ - __slots__ = ('_path_helper', '_extmethods', '__bundled_link',) - - _yang_name = 'bundled-links' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__bundled_link = YANGDynClass(base=YANGListType("sequence",bundled_link.bundled_link, yang_name="bundled-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'bundle')), is_container='list', yang_name="bundled-link", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'bundled-links'] - - def _get_bundled_link(self): - """ - Getter method for bundled_link, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link (list) - - YANG Description: Specifies a bundled interface that is -further partitioned. - """ - return self.__bundled_link - - def _set_bundled_link(self, v, load=False): - """ - Setter method for bundled_link, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_bundled_link is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_bundled_link() directly. - - YANG Description: Specifies a bundled interface that is -further partitioned. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("sequence",bundled_link.bundled_link, yang_name="bundled-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'bundle')), is_container='list', yang_name="bundled-link", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """bundled_link must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("sequence",bundled_link.bundled_link, yang_name="bundled-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'bundle')), is_container='list', yang_name="bundled-link", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__bundled_link = t - if hasattr(self, '_set'): - self._set() - - def _unset_bundled_link(self): - self.__bundled_link = YANGDynClass(base=YANGListType("sequence",bundled_link.bundled_link, yang_name="bundled-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'bundle')), is_container='list', yang_name="bundled-link", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - bundled_link = __builtin__.property(_get_bundled_link, _set_bundled_link) - - __choices__ = {'bundle-stack-level': {'bundle': ['bundled_link']}} - _pyangbind_elements = OrderedDict([('bundled_link', bundled_link), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/bundled_links/bundled_link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/bundled_links/bundled_link/__init__.py deleted file mode 100644 index 99c0b71fe..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/bundled_links/bundled_link/__init__.py +++ /dev/null @@ -1,203 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class bundled_link(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/bundled-links/bundled-link. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Specifies a bundled interface that is -further partitioned. - """ - __slots__ = ('_path_helper', '_extmethods', '__sequence','__src_tp_ref','__des_tp_ref',) - - _yang_name = 'bundled-link' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__src_tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__des_tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="des-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', 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 ['networks', 'network', 'link', 'te', 'bundled-links', 'bundled-link'] - - def _get_sequence(self): - """ - Getter method for sequence, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link/sequence (uint32) - - YANG Description: Identifies the sequence in the bundle. - """ - return self.__sequence - - def _set_sequence(self, v, load=False): - """ - Setter method for sequence, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link/sequence (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_sequence is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sequence() directly. - - YANG Description: Identifies the sequence in the bundle. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sequence 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="sequence", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__sequence = t - if hasattr(self, '_set'): - self._set() - - def _unset_sequence(self): - self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_src_tp_ref(self): - """ - Getter method for src_tp_ref, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link/src_tp_ref (leafref) - - YANG Description: Reference to another TE termination point on the -same source node. - """ - return self.__src_tp_ref - - def _set_src_tp_ref(self, v, load=False): - """ - Setter method for src_tp_ref, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link/src_tp_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_src_tp_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_src_tp_ref() directly. - - YANG Description: Reference to another TE termination point on the -same source node. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="src-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """src_tp_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__src_tp_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_src_tp_ref(self): - self.__src_tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_des_tp_ref(self): - """ - Getter method for des_tp_ref, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link/des_tp_ref (leafref) - - YANG Description: Reference to another TE termination point on the -same destination node. - """ - return self.__des_tp_ref - - def _set_des_tp_ref(self, v, load=False): - """ - Setter method for des_tp_ref, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link/des_tp_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_des_tp_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_des_tp_ref() directly. - - YANG Description: Reference to another TE termination point on the -same destination node. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="des-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """des_tp_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="des-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__des_tp_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_des_tp_ref(self): - self.__des_tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="des-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - sequence = __builtin__.property(_get_sequence, _set_sequence) - src_tp_ref = __builtin__.property(_get_src_tp_ref, _set_src_tp_ref) - des_tp_ref = __builtin__.property(_get_des_tp_ref, _set_des_tp_ref) - - __choices__ = {'bundle-stack-level': {'bundle': ['sequence', 'src_tp_ref', 'des_tp_ref']}} - _pyangbind_elements = OrderedDict([('sequence', sequence), ('src_tp_ref', src_tp_ref), ('des_tp_ref', des_tp_ref), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/component_links/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/component_links/__init__.py deleted file mode 100644 index 2207417bc..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/component_links/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import component_link -class component_links(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/component-links. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A set of component links. - """ - __slots__ = ('_path_helper', '_extmethods', '__component_link',) - - _yang_name = 'component-links' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__component_link = YANGDynClass(base=YANGListType("sequence",component_link.component_link, yang_name="component-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'component')), is_container='list', yang_name="component-link", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'component-links'] - - def _get_component_link(self): - """ - Getter method for component_link, mapped from YANG variable /networks/network/link/te/component_links/component_link (list) - - YANG Description: Specifies a component interface that is -sufficient to unambiguously identify the -appropriate resources. - """ - return self.__component_link - - def _set_component_link(self, v, load=False): - """ - Setter method for component_link, mapped from YANG variable /networks/network/link/te/component_links/component_link (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_component_link is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_component_link() directly. - - YANG Description: Specifies a component interface that is -sufficient to unambiguously identify the -appropriate resources. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("sequence",component_link.component_link, yang_name="component-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'component')), is_container='list', yang_name="component-link", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """component_link must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("sequence",component_link.component_link, yang_name="component-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'component')), is_container='list', yang_name="component-link", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__component_link = t - if hasattr(self, '_set'): - self._set() - - def _unset_component_link(self): - self.__component_link = YANGDynClass(base=YANGListType("sequence",component_link.component_link, yang_name="component-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'component')), is_container='list', yang_name="component-link", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - component_link = __builtin__.property(_get_component_link, _set_component_link) - - __choices__ = {'bundle-stack-level': {'component': ['component_link']}} - _pyangbind_elements = OrderedDict([('component_link', component_link), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/component_links/component_link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/component_links/component_link/__init__.py deleted file mode 100644 index 5995318d7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/component_links/component_link/__init__.py +++ /dev/null @@ -1,204 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class component_link(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/component-links/component-link. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Specifies a component interface that is -sufficient to unambiguously identify the -appropriate resources. - """ - __slots__ = ('_path_helper', '_extmethods', '__sequence','__src_interface_ref','__des_interface_ref',) - - _yang_name = 'component-link' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__src_interface_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__des_interface_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="des-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'component-links', 'component-link'] - - def _get_sequence(self): - """ - Getter method for sequence, mapped from YANG variable /networks/network/link/te/component_links/component_link/sequence (uint32) - - YANG Description: Identifies the sequence in the bundle. - """ - return self.__sequence - - def _set_sequence(self, v, load=False): - """ - Setter method for sequence, mapped from YANG variable /networks/network/link/te/component_links/component_link/sequence (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_sequence is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sequence() directly. - - YANG Description: Identifies the sequence in the bundle. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sequence 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="sequence", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__sequence = t - if hasattr(self, '_set'): - self._set() - - def _unset_sequence(self): - self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_src_interface_ref(self): - """ - Getter method for src_interface_ref, mapped from YANG variable /networks/network/link/te/component_links/component_link/src_interface_ref (string) - - YANG Description: Reference to a component link interface on the -source node. - """ - return self.__src_interface_ref - - def _set_src_interface_ref(self, v, load=False): - """ - Setter method for src_interface_ref, mapped from YANG variable /networks/network/link/te/component_links/component_link/src_interface_ref (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_src_interface_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_src_interface_ref() directly. - - YANG Description: Reference to a component link interface on the -source node. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="src-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """src_interface_ref must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__src_interface_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_src_interface_ref(self): - self.__src_interface_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_des_interface_ref(self): - """ - Getter method for des_interface_ref, mapped from YANG variable /networks/network/link/te/component_links/component_link/des_interface_ref (string) - - YANG Description: Reference to a component link interface on the -destination node. - """ - return self.__des_interface_ref - - def _set_des_interface_ref(self, v, load=False): - """ - Setter method for des_interface_ref, mapped from YANG variable /networks/network/link/te/component_links/component_link/des_interface_ref (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_des_interface_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_des_interface_ref() directly. - - YANG Description: Reference to a component link interface on the -destination node. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="des-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """des_interface_ref must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="des-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__des_interface_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_des_interface_ref(self): - self.__des_interface_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="des-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - sequence = __builtin__.property(_get_sequence, _set_sequence) - src_interface_ref = __builtin__.property(_get_src_interface_ref, _set_src_interface_ref) - des_interface_ref = __builtin__.property(_get_des_interface_ref, _set_des_interface_ref) - - __choices__ = {'bundle-stack-level': {'component': ['sequence', 'src_interface_ref', 'des_interface_ref']}} - _pyangbind_elements = OrderedDict([('sequence', sequence), ('src_interface_ref', src_interface_ref), ('des_interface_ref', des_interface_ref), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/__init__.py deleted file mode 100644 index d331b67df..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/__init__.py +++ /dev/null @@ -1,749 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import information_source_state -from . import interface_switching_capability -from . import label_restrictions -from . import max_link_bandwidth -from . import max_resv_link_bandwidth -from . import unreserved_bandwidth -from . import te_srlgs -from . import te_nsrlgs -class information_source_entry(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of information sources learned, including the source -that is used. - """ - __slots__ = ('_path_helper', '_extmethods', '__information_source','__information_source_instance','__information_source_state','__link_index','__administrative_group','__interface_switching_capability','__label_restrictions','__link_protection_type','__max_link_bandwidth','__max_resv_link_bandwidth','__unreserved_bandwidth','__te_default_metric','__te_delay_metric','__te_igp_metric','__te_srlgs','__te_nsrlgs',) - - _yang_name = 'information-source-entry' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) - self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__link_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - self.__administrative_group = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=False) - self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__link_protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__max_link_bandwidth = YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__max_resv_link_bandwidth = YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__te_default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__te_delay_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__te_igp_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__te_srlgs = YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__te_nsrlgs = YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'link', 'te', 'information-source-entry'] - - def _get_information_source(self): - """ - Getter method for information_source, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source (te-info-source) - - YANG Description: Indicates the type of information source. - """ - return self.__information_source - - def _set_information_source(self, v, load=False): - """ - Setter method for information_source, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source (te-info-source) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source() directly. - - YANG Description: Indicates the type of information source. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source must be of a type compatible with te-info-source""", - 'defined-type': "ietf-te-topology:te-info-source", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False)""", - }) - - self.__information_source = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source(self): - self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) - - - def _get_information_source_instance(self): - """ - Getter method for information_source_instance, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_instance (string) - - YANG Description: The name indicating the instance of the information -source. - """ - return self.__information_source_instance - - def _set_information_source_instance(self, v, load=False): - """ - Setter method for information_source_instance, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_instance (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source_instance is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source_instance() directly. - - YANG Description: The name indicating the instance of the information -source. - """ - 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=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source_instance must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__information_source_instance = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source_instance(self): - self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_information_source_state(self): - """ - Getter method for information_source_state, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state (container) - - YANG Description: Contains state attributes related to the information -source. - """ - return self.__information_source_state - - def _set_information_source_state(self, v, load=False): - """ - Setter method for information_source_state, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source_state is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source_state() directly. - - YANG Description: Contains state attributes related to the information -source. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source_state must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__information_source_state = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source_state(self): - self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_link_index(self): - """ - Getter method for link_index, mapped from YANG variable /networks/network/link/te/information_source_entry/link_index (uint64) - - YANG Description: The link identifier. If OSPF is used, this object -represents an ospfLsdbID. If IS-IS is used, this object -represents an isisLSPID. If a locally configured link is -used, this object represents a unique value, which is -locally defined in a router. - """ - return self.__link_index - - def _set_link_index(self, v, load=False): - """ - Setter method for link_index, mapped from YANG variable /networks/network/link/te/information_source_entry/link_index (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_index() directly. - - YANG Description: The link identifier. If OSPF is used, this object -represents an ospfLsdbID. If IS-IS is used, this object -represents an isisLSPID. If a locally configured link is -used, this object represents a unique value, which is -locally defined in a router. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_index must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__link_index = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_index(self): - self.__link_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - - - def _get_administrative_group(self): - """ - Getter method for administrative_group, mapped from YANG variable /networks/network/link/te/information_source_entry/administrative_group (te-types:admin-groups) - - YANG Description: Administrative group or color of the link. -This attribute covers both administrative groups (defined -in RFCs 3630 and 5305) and Extended Administrative Groups -(defined in RFC 7308). - """ - return self.__administrative_group - - def _set_administrative_group(self, v, load=False): - """ - Setter method for administrative_group, mapped from YANG variable /networks/network/link/te/information_source_entry/administrative_group (te-types:admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_administrative_group is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_administrative_group() directly. - - YANG Description: Administrative group or color of the link. -This attribute covers both administrative groups (defined -in RFCs 3630 and 5305) and Extended Administrative Groups -(defined in RFC 7308). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """administrative_group must be of a type compatible with te-types:admin-groups""", - 'defined-type': "te-types:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=False)""", - }) - - self.__administrative_group = t - if hasattr(self, '_set'): - self._set() - - def _unset_administrative_group(self): - self.__administrative_group = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=False) - - - def _get_interface_switching_capability(self): - """ - Getter method for interface_switching_capability, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability (list) - - YANG Description: List of ISCDs for this link. - """ - return self.__interface_switching_capability - - def _set_interface_switching_capability(self, v, load=False): - """ - Setter method for interface_switching_capability, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_interface_switching_capability is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_interface_switching_capability() directly. - - YANG Description: List of ISCDs for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """interface_switching_capability must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__interface_switching_capability = t - if hasattr(self, '_set'): - self._set() - - def _unset_interface_switching_capability(self): - self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_label_restrictions(self): - """ - Getter method for label_restrictions, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions (container) - - YANG Description: The label restrictions container. - """ - return self.__label_restrictions - - def _set_label_restrictions(self, v, load=False): - """ - Setter method for label_restrictions, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restrictions is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restrictions() directly. - - YANG Description: The label restrictions container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restrictions must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_restrictions = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restrictions(self): - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_link_protection_type(self): - """ - Getter method for link_protection_type, mapped from YANG variable /networks/network/link/te/information_source_entry/link_protection_type (identityref) - - YANG Description: Link Protection Type desired for this link. - """ - return self.__link_protection_type - - def _set_link_protection_type(self, v, load=False): - """ - Setter method for link_protection_type, mapped from YANG variable /networks/network/link/te/information_source_entry/link_protection_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_protection_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_protection_type() directly. - - YANG Description: Link Protection Type desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_protection_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__link_protection_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_protection_type(self): - self.__link_protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_max_link_bandwidth(self): - """ - Getter method for max_link_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth (container) - - YANG Description: Maximum bandwidth that can be seen on this link in this -direction. Units are in bytes per second. - """ - return self.__max_link_bandwidth - - def _set_max_link_bandwidth(self, v, load=False): - """ - Setter method for max_link_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_link_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_link_bandwidth() directly. - - YANG Description: Maximum bandwidth that can be seen on this link in this -direction. Units are in bytes per second. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_link_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__max_link_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_link_bandwidth(self): - self.__max_link_bandwidth = YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_max_resv_link_bandwidth(self): - """ - Getter method for max_resv_link_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth (container) - - YANG Description: Maximum amount of bandwidth that can be reserved in this -direction in this link. Units are in bytes per second. - """ - return self.__max_resv_link_bandwidth - - def _set_max_resv_link_bandwidth(self, v, load=False): - """ - Setter method for max_resv_link_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_resv_link_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_resv_link_bandwidth() directly. - - YANG Description: Maximum amount of bandwidth that can be reserved in this -direction in this link. Units are in bytes per second. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_resv_link_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__max_resv_link_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_resv_link_bandwidth(self): - self.__max_resv_link_bandwidth = YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unreserved_bandwidth(self): - """ - Getter method for unreserved_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth (list) - - YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in -bytes per second. - """ - return self.__unreserved_bandwidth - - def _set_unreserved_bandwidth(self, v, load=False): - """ - Setter method for unreserved_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_unreserved_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unreserved_bandwidth() directly. - - YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in -bytes per second. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unreserved_bandwidth must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__unreserved_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_unreserved_bandwidth(self): - self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_te_default_metric(self): - """ - Getter method for te_default_metric, mapped from YANG variable /networks/network/link/te/information_source_entry/te_default_metric (uint32) - - YANG Description: Traffic Engineering metric. - """ - return self.__te_default_metric - - def _set_te_default_metric(self, v, load=False): - """ - Setter method for te_default_metric, mapped from YANG variable /networks/network/link/te/information_source_entry/te_default_metric (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_default_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_default_metric() directly. - - YANG Description: Traffic Engineering metric. - """ - 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="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_default_metric 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="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__te_default_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_default_metric(self): - self.__te_default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_te_delay_metric(self): - """ - Getter method for te_delay_metric, mapped from YANG variable /networks/network/link/te/information_source_entry/te_delay_metric (uint32) - - YANG Description: Traffic Engineering delay metric. - """ - return self.__te_delay_metric - - def _set_te_delay_metric(self, v, load=False): - """ - Setter method for te_delay_metric, mapped from YANG variable /networks/network/link/te/information_source_entry/te_delay_metric (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_delay_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_delay_metric() directly. - - YANG Description: Traffic Engineering delay metric. - """ - 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="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_delay_metric 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="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__te_delay_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_delay_metric(self): - self.__te_delay_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_te_igp_metric(self): - """ - Getter method for te_igp_metric, mapped from YANG variable /networks/network/link/te/information_source_entry/te_igp_metric (uint32) - - YANG Description: IGP metric used for Traffic Engineering. - """ - return self.__te_igp_metric - - def _set_te_igp_metric(self, v, load=False): - """ - Setter method for te_igp_metric, mapped from YANG variable /networks/network/link/te/information_source_entry/te_igp_metric (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_igp_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_igp_metric() directly. - - YANG Description: IGP metric used for Traffic Engineering. - """ - 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="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_igp_metric 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="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__te_igp_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_igp_metric(self): - self.__te_igp_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_te_srlgs(self): - """ - Getter method for te_srlgs, mapped from YANG variable /networks/network/link/te/information_source_entry/te_srlgs (container) - - YANG Description: Contains a list of SRLGs. - """ - return self.__te_srlgs - - def _set_te_srlgs(self, v, load=False): - """ - Setter method for te_srlgs, mapped from YANG variable /networks/network/link/te/information_source_entry/te_srlgs (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_srlgs is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_srlgs() directly. - - YANG Description: Contains a list of SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_srlgs must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_srlgs = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_srlgs(self): - self.__te_srlgs = YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_te_nsrlgs(self): - """ - Getter method for te_nsrlgs, mapped from YANG variable /networks/network/link/te/information_source_entry/te_nsrlgs (container) - - YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). -When an abstract TE link is configured, this list specifies -the request that underlay TE paths need to be mutually -disjoint with other TE links in the same groups. - """ - return self.__te_nsrlgs - - def _set_te_nsrlgs(self, v, load=False): - """ - Setter method for te_nsrlgs, mapped from YANG variable /networks/network/link/te/information_source_entry/te_nsrlgs (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_nsrlgs is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_nsrlgs() directly. - - YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). -When an abstract TE link is configured, this list specifies -the request that underlay TE paths need to be mutually -disjoint with other TE links in the same groups. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_nsrlgs must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_nsrlgs = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_nsrlgs(self): - self.__te_nsrlgs = YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - information_source = __builtin__.property(_get_information_source) - information_source_instance = __builtin__.property(_get_information_source_instance) - information_source_state = __builtin__.property(_get_information_source_state) - link_index = __builtin__.property(_get_link_index) - administrative_group = __builtin__.property(_get_administrative_group) - interface_switching_capability = __builtin__.property(_get_interface_switching_capability) - label_restrictions = __builtin__.property(_get_label_restrictions) - link_protection_type = __builtin__.property(_get_link_protection_type) - max_link_bandwidth = __builtin__.property(_get_max_link_bandwidth) - max_resv_link_bandwidth = __builtin__.property(_get_max_resv_link_bandwidth) - unreserved_bandwidth = __builtin__.property(_get_unreserved_bandwidth) - te_default_metric = __builtin__.property(_get_te_default_metric) - te_delay_metric = __builtin__.property(_get_te_delay_metric) - te_igp_metric = __builtin__.property(_get_te_igp_metric) - te_srlgs = __builtin__.property(_get_te_srlgs) - te_nsrlgs = __builtin__.property(_get_te_nsrlgs) - - - _pyangbind_elements = OrderedDict([('information_source', information_source), ('information_source_instance', information_source_instance), ('information_source_state', information_source_state), ('link_index', link_index), ('administrative_group', administrative_group), ('interface_switching_capability', interface_switching_capability), ('label_restrictions', label_restrictions), ('link_protection_type', link_protection_type), ('max_link_bandwidth', max_link_bandwidth), ('max_resv_link_bandwidth', max_resv_link_bandwidth), ('unreserved_bandwidth', unreserved_bandwidth), ('te_default_metric', te_default_metric), ('te_delay_metric', te_delay_metric), ('te_igp_metric', te_igp_metric), ('te_srlgs', te_srlgs), ('te_nsrlgs', te_nsrlgs), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py deleted file mode 100644 index 51885bb49..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py +++ /dev/null @@ -1,248 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import topology -class information_source_state(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/information-source-state. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains state attributes related to the information -source. - """ - __slots__ = ('_path_helper', '_extmethods', '__credibility_preference','__logical_network_element','__network_instance','__topology',) - - _yang_name = 'information-source-state' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'information-source-state'] - - def _get_credibility_preference(self): - """ - Getter method for credibility_preference, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/credibility_preference (uint16) - - YANG Description: The preference value for calculating the Traffic -Engineering database credibility value used for -tie-break selection between different information-source -values. A higher value is preferable. - """ - return self.__credibility_preference - - def _set_credibility_preference(self, v, load=False): - """ - Setter method for credibility_preference, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/credibility_preference (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_credibility_preference is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_credibility_preference() directly. - - YANG Description: The preference value for calculating the Traffic -Engineering database credibility value used for -tie-break selection between different information-source -values. A higher value is preferable. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """credibility_preference must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False)""", - }) - - self.__credibility_preference = t - if hasattr(self, '_set'): - self._set() - - def _unset_credibility_preference(self): - self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - - - def _get_logical_network_element(self): - """ - Getter method for logical_network_element, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/logical_network_element (string) - - YANG Description: When applicable, this is the name of a logical network -element from which the information is learned. - """ - return self.__logical_network_element - - def _set_logical_network_element(self, v, load=False): - """ - Setter method for logical_network_element, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/logical_network_element (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_logical_network_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_logical_network_element() directly. - - YANG Description: When applicable, this is the name of a logical network -element from which the information is learned. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """logical_network_element must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__logical_network_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_logical_network_element(self): - self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_network_instance(self): - """ - Getter method for network_instance, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/network_instance (string) - - YANG Description: When applicable, this is the name of a network instance -from which the information is learned. - """ - return self.__network_instance - - def _set_network_instance(self, v, load=False): - """ - Setter method for network_instance, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/network_instance (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_instance is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_instance() directly. - - YANG Description: When applicable, this is the name of a network instance -from which the information is learned. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_instance must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__network_instance = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_instance(self): - self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_topology(self): - """ - Getter method for topology, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/topology (container) - - YANG Description: When the information is processed by the system, -the attributes in this container indicate which topology -is used to generate the result information. - """ - return self.__topology - - def _set_topology(self, v, load=False): - """ - Setter method for topology, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/topology (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_topology is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_topology() directly. - - YANG Description: When the information is processed by the system, -the attributes in this container indicate which topology -is used to generate the result information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """topology must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__topology = t - if hasattr(self, '_set'): - self._set() - - def _unset_topology(self): - self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - credibility_preference = __builtin__.property(_get_credibility_preference) - logical_network_element = __builtin__.property(_get_logical_network_element) - network_instance = __builtin__.property(_get_network_instance) - topology = __builtin__.property(_get_topology) - - - _pyangbind_elements = OrderedDict([('credibility_preference', credibility_preference), ('logical_network_element', logical_network_element), ('network_instance', network_instance), ('topology', topology), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py deleted file mode 100644 index 0c611a8e1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class topology(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/information-source-state/topology. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: When the information is processed by the system, -the attributes in this container indicate which topology -is used to generate the result information. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_ref','__network_ref',) - - _yang_name = 'topology' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'information-source-state', 'topology'] - - def _get_link_ref(self): - """ - Getter method for link_ref, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/topology/link_ref (leafref) - - YANG Description: A type for an absolute reference to a link instance. -(This type should not be used for relative references. -In such a case, a relative path should be used instead.) - """ - return self.__link_ref - - def _set_link_ref(self, v, load=False): - """ - Setter method for link_ref, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/topology/link_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_ref() directly. - - YANG Description: A type for an absolute reference to a link instance. -(This type should not be used for relative references. -In such a case, a relative path should be used instead.) - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__link_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_ref(self): - self.__link_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/topology/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/topology/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - link_ref = __builtin__.property(_get_link_ref) - network_ref = __builtin__.property(_get_network_ref) - - - _pyangbind_elements = OrderedDict([('link_ref', link_ref), ('network_ref', network_ref), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py deleted file mode 100644 index 55c5599b7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py +++ /dev/null @@ -1,206 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import max_lsp_bandwidth -class interface_switching_capability(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/interface-switching-capability. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of ISCDs for this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__switching_capability','__encoding','__max_lsp_bandwidth',) - - _yang_name = 'interface-switching-capability' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'interface-switching-capability'] - - def _get_switching_capability(self): - """ - Getter method for switching_capability, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/switching_capability (identityref) - - YANG Description: Switching capability for this interface. - """ - return self.__switching_capability - - def _set_switching_capability(self, v, load=False): - """ - Setter method for switching_capability, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/switching_capability (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_switching_capability is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_switching_capability() directly. - - YANG Description: Switching capability for this interface. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """switching_capability must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__switching_capability = t - if hasattr(self, '_set'): - self._set() - - def _unset_switching_capability(self): - self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_encoding(self): - """ - Getter method for encoding, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/encoding (identityref) - - YANG Description: Encoding supported by this interface. - """ - return self.__encoding - - def _set_encoding(self, v, load=False): - """ - Setter method for encoding, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/encoding (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_encoding is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_encoding() directly. - - YANG Description: Encoding supported by this interface. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """encoding must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__encoding = t - if hasattr(self, '_set'): - self._set() - - def _unset_encoding(self): - self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_max_lsp_bandwidth(self): - """ - Getter method for max_lsp_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth (list) - - YANG Description: Maximum Label Switched Path (LSP) bandwidth at -priorities 0-7. - """ - return self.__max_lsp_bandwidth - - def _set_max_lsp_bandwidth(self, v, load=False): - """ - Setter method for max_lsp_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_lsp_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_lsp_bandwidth() directly. - - YANG Description: Maximum Label Switched Path (LSP) bandwidth at -priorities 0-7. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_lsp_bandwidth must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__max_lsp_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_lsp_bandwidth(self): - self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - switching_capability = __builtin__.property(_get_switching_capability) - encoding = __builtin__.property(_get_encoding) - max_lsp_bandwidth = __builtin__.property(_get_max_lsp_bandwidth) - - - _pyangbind_elements = OrderedDict([('switching_capability', switching_capability), ('encoding', encoding), ('max_lsp_bandwidth', max_lsp_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py deleted file mode 100644 index 752eac929..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class max_lsp_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/interface-switching-capability/max-lsp-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum Label Switched Path (LSP) bandwidth at -priorities 0-7. - """ - __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) - - _yang_name = 'max-lsp-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'interface-switching-capability', 'max-lsp-bandwidth'] - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/priority (uint8) - - YANG Description: Priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority. - """ - 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=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - priority = __builtin__.property(_get_priority) - te_bandwidth = __builtin__.property(_get_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py deleted file mode 100644 index 4daa8700c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/interface-switching-capability/max-lsp-bandwidth/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) - - YANG Description: Maximum bandwidth attributes for OTN paths. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Maximum bandwidth attributes for OTN paths. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py deleted file mode 100644 index ad8f9372d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,156 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/interface-switching-capability/max-lsp-bandwidth/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum bandwidth attributes for OTN paths. - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__max_ts_number',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth', 'otn'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_max_ts_number(self): - """ - Getter method for max_ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) - - YANG Description: The maximum number of Tributary Slots (TS) that could be -used by an ODUflex LSP. - """ - return self.__max_ts_number - - def _set_max_ts_number(self, v, load=False): - """ - Setter method for max_ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_ts_number() directly. - - YANG Description: The maximum number of Tributary Slots (TS) that could be -used by an ODUflex LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", - }) - - self.__max_ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_ts_number(self): - self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - - odu_type = __builtin__.property(_get_odu_type) - max_ts_number = __builtin__.property(_get_max_ts_number) - - __choices__ = {'technology': {'otn': ['odu_type', 'max_ts_number']}} - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('max_ts_number', max_ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py deleted file mode 100644 index 47f225a47..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restriction -class label_restrictions(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The label restrictions container. - """ - __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) - - _yang_name = 'label-restrictions' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions'] - - def _get_label_restriction(self): - """ - Getter method for label_restriction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction (list) - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - return self.__label_restriction - - def _set_label_restriction(self, v, load=False): - """ - Setter method for label_restriction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restriction() directly. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restriction must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__label_restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restriction(self): - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - label_restriction = __builtin__.property(_get_label_restriction) - - - _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py deleted file mode 100644 index c7ec9312d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py +++ /dev/null @@ -1,450 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_start -from . import label_end -from . import label_step -from . import otn_label_range -from . import ethernet_label_range -class label_restriction(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) - - _yang_name = 'label-restriction' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction'] - - def _get_restriction(self): - """ - Getter method for restriction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/restriction (enumeration) - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - return self.__restriction - - def _set_restriction(self, v, load=False): - """ - Setter method for restriction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/restriction (enumeration) - If this variable is read-only (config: false) in the - source YANG file, then _set_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restriction() directly. - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restriction must be of a type compatible with enumeration""", - 'defined-type': "ietf-te-topology:enumeration", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False)""", - }) - - self.__restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_restriction(self): - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) - - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/index (uint32) - - YANG Description: The index of the label restriction list entry. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: The index of the label restriction list entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_label_start(self): - """ - Getter method for label_start, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start (container) - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - return self.__label_start - - def _set_label_start(self, v, load=False): - """ - Setter method for label_start, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_start is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_start() directly. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_start must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_start = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_start(self): - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_end(self): - """ - Getter method for label_end, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end (container) - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - return self.__label_end - - def _set_label_end(self, v, load=False): - """ - Setter method for label_end, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_end is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_end() directly. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_end must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_end = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_end(self): - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_step(self): - """ - Getter method for label_step, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step (container) - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - return self.__label_step - - def _set_label_step(self, v, load=False): - """ - Setter method for label_step, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_step() directly. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_step must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_step(self): - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_range_bitmap(self): - """ - Getter method for range_bitmap, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - return self.__range_bitmap - - def _set_range_bitmap(self, v, load=False): - """ - Setter method for range_bitmap, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_bitmap is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_bitmap() directly. - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", - 'defined-type': "yang:hex-string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False)""", - }) - - self.__range_bitmap = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_bitmap(self): - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) - - - def _get_otn_label_range(self): - """ - Getter method for otn_label_range, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range (container) - - YANG Description: Label range information for OTN. - """ - return self.__otn_label_range - - def _set_otn_label_range(self, v, load=False): - """ - Setter method for otn_label_range, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn_label_range() directly. - - YANG Description: Label range information for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn_label_range(self): - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_ethernet_label_range(self): - """ - Getter method for ethernet_label_range, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range (container) - - YANG Description: Ethernet-specific label range related information. - """ - return self.__ethernet_label_range - - def _set_ethernet_label_range(self, v, load=False): - """ - Setter method for ethernet_label_range, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_ethernet_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ethernet_label_range() directly. - - YANG Description: Ethernet-specific label range related information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ethernet_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False)""", - }) - - self.__ethernet_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_ethernet_label_range(self): - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) - - restriction = __builtin__.property(_get_restriction) - index = __builtin__.property(_get_index) - label_start = __builtin__.property(_get_label_start) - label_end = __builtin__.property(_get_label_end) - label_step = __builtin__.property(_get_label_step) - range_bitmap = __builtin__.property(_get_range_bitmap) - otn_label_range = __builtin__.property(_get_otn_label_range) - ethernet_label_range = __builtin__.property(_get_ethernet_label_range) - - - _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/__init__.py deleted file mode 100644 index 24ee2d6c9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ethernet_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/ethernet-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Ethernet-specific label range related information. - """ - __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) - - _yang_name = 'ethernet-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] - - def _get_tag_type(self): - """ - Getter method for tag_type, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - - YANG Description: VLAN tag type. - """ - return self.__tag_type - - def _set_tag_type(self, v, load=False): - """ - Setter method for tag_type, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_tag_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tag_type() directly. - - YANG Description: VLAN tag type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", - 'defined-type': "etht-types:eth-tag-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False)""", - }) - - self.__tag_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tag_type(self): - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - - YANG Description: priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) - - tag_type = __builtin__.property(_get_tag_type) - priority = __builtin__.property(_get_priority) - - - _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py deleted file mode 100644 index 105618cf9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_end(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-end. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-end' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-end'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py deleted file mode 100644 index 696280486..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-end/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py deleted file mode 100644 index 7e552cd7f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - - tpn = __builtin__.property(_get_tpn) - ts = __builtin__.property(_get_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py deleted file mode 100644 index 06a33be37..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_start(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-start. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-start' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-start'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py deleted file mode 100644 index 1d3235b98..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-start/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py deleted file mode 100644 index 4a9eb242f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - - tpn = __builtin__.property(_get_tpn) - ts = __builtin__.property(_get_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py deleted file mode 100644 index e7fa272ea..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class label_step(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-step. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) - - _yang_name = 'label-step' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-step'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/generic (int32) - - YANG Description: Label range step. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/generic (int32) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Label range step. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with int32""", - 'defined-type': "int32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn (container) - - YANG Description: Label step for OTN - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label step for OTN - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_eth_step(self): - """ - Getter method for eth_step, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/eth_step (uint16) - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - return self.__eth_step - - def _set_eth_step(self, v, load=False): - """ - Setter method for eth_step, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/eth_step (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_step() directly. - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_step must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False)""", - }) - - self.__eth_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_step(self): - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - eth_step = __builtin__.property(_get_eth_step) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/__init__.py deleted file mode 100644 index 335aed796..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-step/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label step for OTN - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - - tpn = __builtin__.property(_get_tpn) - ts = __builtin__.property(_get_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/__init__.py deleted file mode 100644 index 0c3ff7aaa..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/__init__.py +++ /dev/null @@ -1,256 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/otn-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label range information for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) - - _yang_name = 'otn-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'otn-label-range'] - - def _get_range_type(self): - """ - Getter method for range_type, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - return self.__range_type - - def _set_range_type(self, v, load=False): - """ - Setter method for range_type, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_type() directly. - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_type must be of a type compatible with otn-label-range-type""", - 'defined-type': "ietf-otn-topology:otn-label-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False)""", - }) - - self.__range_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_type(self): - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_odu_type_list(self): - """ - Getter method for odu_type_list, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - return self.__odu_type_list - - def _set_odu_type_list(self, v, load=False): - """ - Setter method for odu_type_list, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type_list() directly. - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type_list must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__odu_type_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type_list(self): - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/priority (uint8) - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) - - range_type = __builtin__.property(_get_range_type) - tsg = __builtin__.property(_get_tsg) - odu_type_list = __builtin__.property(_get_odu_type_list) - priority = __builtin__.property(_get_priority) - - - _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py deleted file mode 100644 index cfa184bcb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class max_link_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-link-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum bandwidth that can be seen on this link in this -direction. Units are in bytes per second. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth',) - - _yang_name = 'max-link-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-link-bandwidth'] - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_bandwidth = __builtin__.property(_get_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py deleted file mode 100644 index 26e64557c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-link-bandwidth/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-link-bandwidth', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/__init__.py deleted file mode 100644 index ff7bba04a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-link-bandwidth/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-link-bandwidth', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) - - odulist = __builtin__.property(_get_odulist) - - - _pyangbind_elements = OrderedDict([('odulist', odulist), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index 544fbbda7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-link-bandwidth/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-link-bandwidth', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - - odu_type = __builtin__.property(_get_odu_type) - number = __builtin__.property(_get_number) - ts_number = __builtin__.property(_get_ts_number) - - - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py deleted file mode 100644 index 08adf3f16..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class max_resv_link_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-resv-link-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum amount of bandwidth that can be reserved in this -direction in this link. Units are in bytes per second. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth',) - - _yang_name = 'max-resv-link-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-resv-link-bandwidth'] - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_bandwidth = __builtin__.property(_get_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py deleted file mode 100644 index bf441d72d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-resv-link-bandwidth/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-resv-link-bandwidth', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py deleted file mode 100644 index 1e7147727..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-resv-link-bandwidth/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-resv-link-bandwidth', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) - - odulist = __builtin__.property(_get_odulist) - - - _pyangbind_elements = OrderedDict([('odulist', odulist), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index aff2126e7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-resv-link-bandwidth/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-resv-link-bandwidth', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - - odu_type = __builtin__.property(_get_odu_type) - number = __builtin__.property(_get_number) - ts_number = __builtin__.property(_get_ts_number) - - - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py deleted file mode 100644 index a6704d845..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class te_nsrlgs(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/te-nsrlgs. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). -When an abstract TE link is configured, this list specifies -the request that underlay TE paths need to be mutually -disjoint with other TE links in the same groups. - """ - __slots__ = ('_path_helper', '_extmethods', '__id',) - - _yang_name = 'te-nsrlgs' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'te-nsrlgs'] - - def _get_id(self): - """ - Getter method for id, mapped from YANG variable /networks/network/link/te/information_source_entry/te_nsrlgs/id (uint32) - - YANG Description: NSRLG ID, uniquely configured within a topology. - """ - return self.__id - - def _set_id(self, v, load=False): - """ - Setter method for id, mapped from YANG variable /networks/network/link/te/information_source_entry/te_nsrlgs/id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_id() directly. - - YANG Description: NSRLG ID, uniquely configured within a topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """id must be of a type compatible with uint32""", - 'defined-type': "uint32", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__id = t - if hasattr(self, '_set'): - self._set() - - def _unset_id(self): - self.__id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - id = __builtin__.property(_get_id) - - - _pyangbind_elements = OrderedDict([('id', id), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py deleted file mode 100644 index 9c51afe6b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py +++ /dev/null @@ -1,115 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class te_srlgs(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/te-srlgs. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains a list of SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__value',) - - _yang_name = 'te-srlgs' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'te-srlgs'] - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/link/te/information_source_entry/te_srlgs/value (te-types:srlg) - - YANG Description: SRLG value. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/link/te/information_source_entry/te_srlgs/value (te-types:srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: SRLG value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with te-types:srlg""", - 'defined-type': "te-types:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=False)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=False) - - value = __builtin__.property(_get_value) - - - _pyangbind_elements = OrderedDict([('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py deleted file mode 100644 index a21517063..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class unreserved_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/unreserved-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in -bytes per second. - """ - __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) - - _yang_name = 'unreserved-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'unreserved-bandwidth'] - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/priority (uint8) - - YANG Description: Priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority. - """ - 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=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - priority = __builtin__.property(_get_priority) - te_bandwidth = __builtin__.property(_get_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py deleted file mode 100644 index c786d1941..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/unreserved-bandwidth/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'unreserved-bandwidth', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/__init__.py deleted file mode 100644 index 8e3a01bca..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/unreserved-bandwidth/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'unreserved-bandwidth', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) - - odulist = __builtin__.property(_get_odulist) - - - _pyangbind_elements = OrderedDict([('odulist', odulist), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index a0e9a8f1d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/unreserved-bandwidth/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'link', 'te', 'information-source-entry', 'unreserved-bandwidth', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - - odu_type = __builtin__.property(_get_odu_type) - number = __builtin__.property(_get_number) - ts_number = __builtin__.property(_get_ts_number) - - - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_state/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_state/__init__.py deleted file mode 100644 index 4646d0026..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_state/__init__.py +++ /dev/null @@ -1,248 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import topology -class information_source_state(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-state. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains state attributes related to the information -source. - """ - __slots__ = ('_path_helper', '_extmethods', '__credibility_preference','__logical_network_element','__network_instance','__topology',) - - _yang_name = 'information-source-state' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'link', 'te', 'information-source-state'] - - def _get_credibility_preference(self): - """ - Getter method for credibility_preference, mapped from YANG variable /networks/network/link/te/information_source_state/credibility_preference (uint16) - - YANG Description: The preference value for calculating the Traffic -Engineering database credibility value used for -tie-break selection between different information-source -values. A higher value is preferable. - """ - return self.__credibility_preference - - def _set_credibility_preference(self, v, load=False): - """ - Setter method for credibility_preference, mapped from YANG variable /networks/network/link/te/information_source_state/credibility_preference (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_credibility_preference is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_credibility_preference() directly. - - YANG Description: The preference value for calculating the Traffic -Engineering database credibility value used for -tie-break selection between different information-source -values. A higher value is preferable. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """credibility_preference must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False)""", - }) - - self.__credibility_preference = t - if hasattr(self, '_set'): - self._set() - - def _unset_credibility_preference(self): - self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - - - def _get_logical_network_element(self): - """ - Getter method for logical_network_element, mapped from YANG variable /networks/network/link/te/information_source_state/logical_network_element (string) - - YANG Description: When applicable, this is the name of a logical network -element from which the information is learned. - """ - return self.__logical_network_element - - def _set_logical_network_element(self, v, load=False): - """ - Setter method for logical_network_element, mapped from YANG variable /networks/network/link/te/information_source_state/logical_network_element (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_logical_network_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_logical_network_element() directly. - - YANG Description: When applicable, this is the name of a logical network -element from which the information is learned. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """logical_network_element must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__logical_network_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_logical_network_element(self): - self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_network_instance(self): - """ - Getter method for network_instance, mapped from YANG variable /networks/network/link/te/information_source_state/network_instance (string) - - YANG Description: When applicable, this is the name of a network instance -from which the information is learned. - """ - return self.__network_instance - - def _set_network_instance(self, v, load=False): - """ - Setter method for network_instance, mapped from YANG variable /networks/network/link/te/information_source_state/network_instance (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_instance is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_instance() directly. - - YANG Description: When applicable, this is the name of a network instance -from which the information is learned. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_instance must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__network_instance = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_instance(self): - self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_topology(self): - """ - Getter method for topology, mapped from YANG variable /networks/network/link/te/information_source_state/topology (container) - - YANG Description: When the information is processed by the system, -the attributes in this container indicate which topology -is used to generate the result information. - """ - return self.__topology - - def _set_topology(self, v, load=False): - """ - Setter method for topology, mapped from YANG variable /networks/network/link/te/information_source_state/topology (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_topology is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_topology() directly. - - YANG Description: When the information is processed by the system, -the attributes in this container indicate which topology -is used to generate the result information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """topology must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__topology = t - if hasattr(self, '_set'): - self._set() - - def _unset_topology(self): - self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - credibility_preference = __builtin__.property(_get_credibility_preference) - logical_network_element = __builtin__.property(_get_logical_network_element) - network_instance = __builtin__.property(_get_network_instance) - topology = __builtin__.property(_get_topology) - - - _pyangbind_elements = OrderedDict([('credibility_preference', credibility_preference), ('logical_network_element', logical_network_element), ('network_instance', network_instance), ('topology', topology), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_state/topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_state/topology/__init__.py deleted file mode 100644 index 6a22bed59..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/information_source_state/topology/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class topology(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/information-source-state/topology. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: When the information is processed by the system, -the attributes in this container indicate which topology -is used to generate the result information. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_ref','__network_ref',) - - _yang_name = 'topology' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', 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 ['networks', 'network', 'link', 'te', 'information-source-state', 'topology'] - - def _get_link_ref(self): - """ - Getter method for link_ref, mapped from YANG variable /networks/network/link/te/information_source_state/topology/link_ref (leafref) - - YANG Description: A type for an absolute reference to a link instance. -(This type should not be used for relative references. -In such a case, a relative path should be used instead.) - """ - return self.__link_ref - - def _set_link_ref(self, v, load=False): - """ - Setter method for link_ref, mapped from YANG variable /networks/network/link/te/information_source_state/topology/link_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_ref() directly. - - YANG Description: A type for an absolute reference to a link instance. -(This type should not be used for relative references. -In such a case, a relative path should be used instead.) - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__link_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_ref(self): - self.__link_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/link/te/information_source_state/topology/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/link/te/information_source_state/topology/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - link_ref = __builtin__.property(_get_link_ref) - network_ref = __builtin__.property(_get_network_ref) - - - _pyangbind_elements = OrderedDict([('link_ref', link_ref), ('network_ref', network_ref), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/recovery/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/recovery/__init__.py deleted file mode 100644 index 441cf6d42..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/recovery/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class recovery(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/recovery. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Status of the recovery process. - """ - __slots__ = ('_path_helper', '_extmethods', '__restoration_status','__protection_status',) - - _yang_name = 'recovery' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__restoration_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="restoration-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False) - self.__protection_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="protection-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', 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 ['networks', 'network', 'link', 'te', 'recovery'] - - def _get_restoration_status(self): - """ - Getter method for restoration_status, mapped from YANG variable /networks/network/link/te/recovery/restoration_status (te-types:te-recovery-status) - - YANG Description: Restoration status. - """ - return self.__restoration_status - - def _set_restoration_status(self, v, load=False): - """ - Setter method for restoration_status, mapped from YANG variable /networks/network/link/te/recovery/restoration_status (te-types:te-recovery-status) - If this variable is read-only (config: false) in the - source YANG file, then _set_restoration_status is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restoration_status() directly. - - YANG Description: Restoration status. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="restoration-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restoration_status must be of a type compatible with te-types:te-recovery-status""", - 'defined-type': "te-types:te-recovery-status", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="restoration-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False)""", - }) - - self.__restoration_status = t - if hasattr(self, '_set'): - self._set() - - def _unset_restoration_status(self): - self.__restoration_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="restoration-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False) - - - def _get_protection_status(self): - """ - Getter method for protection_status, mapped from YANG variable /networks/network/link/te/recovery/protection_status (te-types:te-recovery-status) - - YANG Description: Protection status. - """ - return self.__protection_status - - def _set_protection_status(self, v, load=False): - """ - Setter method for protection_status, mapped from YANG variable /networks/network/link/te/recovery/protection_status (te-types:te-recovery-status) - If this variable is read-only (config: false) in the - source YANG file, then _set_protection_status is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_protection_status() directly. - - YANG Description: Protection status. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="protection-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """protection_status must be of a type compatible with te-types:te-recovery-status""", - 'defined-type': "te-types:te-recovery-status", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="protection-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False)""", - }) - - self.__protection_status = t - if hasattr(self, '_set'): - self._set() - - def _unset_protection_status(self): - self.__protection_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="protection-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False) - - restoration_status = __builtin__.property(_get_restoration_status) - protection_status = __builtin__.property(_get_protection_status) - - - _pyangbind_elements = OrderedDict([('restoration_status', restoration_status), ('protection_status', protection_status), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/statistics/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/statistics/__init__.py deleted file mode 100644 index cbfbda90f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/statistics/__init__.py +++ /dev/null @@ -1,810 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class statistics(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/statistics. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Statistics data. - """ - __slots__ = ('_path_helper', '_extmethods', '__discontinuity_time','__disables','__enables','__maintenance_clears','__maintenance_sets','__modifies','__downs','__ups','__fault_clears','__fault_detects','__protection_switches','__protection_reverts','__restoration_failures','__restoration_starts','__restoration_successes','__restoration_reversion_failures','__restoration_reversion_starts','__restoration_reversion_successes',) - - _yang_name = 'statistics' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__discontinuity_time = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) - self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__maintenance_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__maintenance_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__downs = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__ups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__fault_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__fault_detects = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-detects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__protection_switches = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-switches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__protection_reverts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-reverts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__restoration_failures = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__restoration_starts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__restoration_successes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__restoration_reversion_failures = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__restoration_reversion_starts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__restoration_reversion_successes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', 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 ['networks', 'network', 'link', 'te', 'statistics'] - - def _get_discontinuity_time(self): - """ - Getter method for discontinuity_time, mapped from YANG variable /networks/network/link/te/statistics/discontinuity_time (yang:date-and-time) - - YANG Description: The time of the most recent occasion at which any one or -more of this interface's counters suffered a -discontinuity. If no such discontinuities have occurred -since the last re-initialization of the local management -subsystem, then this node contains the time the local -management subsystem re-initialized itself. - """ - return self.__discontinuity_time - - def _set_discontinuity_time(self, v, load=False): - """ - Setter method for discontinuity_time, mapped from YANG variable /networks/network/link/te/statistics/discontinuity_time (yang:date-and-time) - If this variable is read-only (config: false) in the - source YANG file, then _set_discontinuity_time is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_discontinuity_time() directly. - - YANG Description: The time of the most recent occasion at which any one or -more of this interface's counters suffered a -discontinuity. If no such discontinuities have occurred -since the last re-initialization of the local management -subsystem, then this node contains the time the local -management subsystem re-initialized itself. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """discontinuity_time must be of a type compatible with yang:date-and-time""", - 'defined-type': "yang:date-and-time", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False)""", - }) - - self.__discontinuity_time = t - if hasattr(self, '_set'): - self._set() - - def _unset_discontinuity_time(self): - self.__discontinuity_time = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) - - - def _get_disables(self): - """ - Getter method for disables, mapped from YANG variable /networks/network/link/te/statistics/disables (yang:counter32) - - YANG Description: Number of times that a link was disabled. - """ - return self.__disables - - def _set_disables(self, v, load=False): - """ - Setter method for disables, mapped from YANG variable /networks/network/link/te/statistics/disables (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_disables is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_disables() directly. - - YANG Description: Number of times that a link was disabled. - """ - 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="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """disables must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__disables = t - if hasattr(self, '_set'): - self._set() - - def _unset_disables(self): - self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_enables(self): - """ - Getter method for enables, mapped from YANG variable /networks/network/link/te/statistics/enables (yang:counter32) - - YANG Description: Number of times that a link was enabled. - """ - return self.__enables - - def _set_enables(self, v, load=False): - """ - Setter method for enables, mapped from YANG variable /networks/network/link/te/statistics/enables (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_enables is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_enables() directly. - - YANG Description: Number of times that a link was enabled. - """ - 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="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """enables must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__enables = t - if hasattr(self, '_set'): - self._set() - - def _unset_enables(self): - self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_maintenance_clears(self): - """ - Getter method for maintenance_clears, mapped from YANG variable /networks/network/link/te/statistics/maintenance_clears (yang:counter32) - - YANG Description: Number of times that a link was taken out of maintenance. - """ - return self.__maintenance_clears - - def _set_maintenance_clears(self, v, load=False): - """ - Setter method for maintenance_clears, mapped from YANG variable /networks/network/link/te/statistics/maintenance_clears (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_maintenance_clears is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_maintenance_clears() directly. - - YANG Description: Number of times that a link was taken out of maintenance. - """ - 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="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """maintenance_clears must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__maintenance_clears = t - if hasattr(self, '_set'): - self._set() - - def _unset_maintenance_clears(self): - self.__maintenance_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_maintenance_sets(self): - """ - Getter method for maintenance_sets, mapped from YANG variable /networks/network/link/te/statistics/maintenance_sets (yang:counter32) - - YANG Description: Number of times that a link was put in maintenance. - """ - return self.__maintenance_sets - - def _set_maintenance_sets(self, v, load=False): - """ - Setter method for maintenance_sets, mapped from YANG variable /networks/network/link/te/statistics/maintenance_sets (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_maintenance_sets is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_maintenance_sets() directly. - - YANG Description: Number of times that a link was put in maintenance. - """ - 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="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """maintenance_sets must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__maintenance_sets = t - if hasattr(self, '_set'): - self._set() - - def _unset_maintenance_sets(self): - self.__maintenance_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_modifies(self): - """ - Getter method for modifies, mapped from YANG variable /networks/network/link/te/statistics/modifies (yang:counter32) - - YANG Description: Number of times that a link was modified. - """ - return self.__modifies - - def _set_modifies(self, v, load=False): - """ - Setter method for modifies, mapped from YANG variable /networks/network/link/te/statistics/modifies (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_modifies is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_modifies() directly. - - YANG Description: Number of times that a link was modified. - """ - 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="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """modifies must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__modifies = t - if hasattr(self, '_set'): - self._set() - - def _unset_modifies(self): - self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_downs(self): - """ - Getter method for downs, mapped from YANG variable /networks/network/link/te/statistics/downs (yang:counter32) - - YANG Description: Number of times that a link was set to an operational state -of 'down'. - """ - return self.__downs - - def _set_downs(self, v, load=False): - """ - Setter method for downs, mapped from YANG variable /networks/network/link/te/statistics/downs (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_downs is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_downs() directly. - - YANG Description: Number of times that a link was set to an operational state -of 'down'. - """ - 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="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """downs must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__downs = t - if hasattr(self, '_set'): - self._set() - - def _unset_downs(self): - self.__downs = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_ups(self): - """ - Getter method for ups, mapped from YANG variable /networks/network/link/te/statistics/ups (yang:counter32) - - YANG Description: Number of times that a link was set to an operational state -of 'up'. - """ - return self.__ups - - def _set_ups(self, v, load=False): - """ - Setter method for ups, mapped from YANG variable /networks/network/link/te/statistics/ups (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_ups is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ups() directly. - - YANG Description: Number of times that a link was set to an operational 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="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ups must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__ups = t - if hasattr(self, '_set'): - self._set() - - def _unset_ups(self): - self.__ups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_fault_clears(self): - """ - Getter method for fault_clears, mapped from YANG variable /networks/network/link/te/statistics/fault_clears (yang:counter32) - - YANG Description: Number of times that a link experienced a fault-clear -event. - """ - return self.__fault_clears - - def _set_fault_clears(self, v, load=False): - """ - Setter method for fault_clears, mapped from YANG variable /networks/network/link/te/statistics/fault_clears (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_fault_clears is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_fault_clears() directly. - - YANG Description: Number of times that a link experienced a fault-clear -event. - """ - 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="fault-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """fault_clears must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__fault_clears = t - if hasattr(self, '_set'): - self._set() - - def _unset_fault_clears(self): - self.__fault_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_fault_detects(self): - """ - Getter method for fault_detects, mapped from YANG variable /networks/network/link/te/statistics/fault_detects (yang:counter32) - - YANG Description: Number of times that a link experienced fault detection. - """ - return self.__fault_detects - - def _set_fault_detects(self, v, load=False): - """ - Setter method for fault_detects, mapped from YANG variable /networks/network/link/te/statistics/fault_detects (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_fault_detects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_fault_detects() directly. - - YANG Description: Number of times that a link experienced fault detection. - """ - 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="fault-detects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """fault_detects must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-detects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__fault_detects = t - if hasattr(self, '_set'): - self._set() - - def _unset_fault_detects(self): - self.__fault_detects = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-detects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_protection_switches(self): - """ - Getter method for protection_switches, mapped from YANG variable /networks/network/link/te/statistics/protection_switches (yang:counter32) - - YANG Description: Number of times that a link experienced protection -switchover. - """ - return self.__protection_switches - - def _set_protection_switches(self, v, load=False): - """ - Setter method for protection_switches, mapped from YANG variable /networks/network/link/te/statistics/protection_switches (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_protection_switches is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_protection_switches() directly. - - YANG Description: Number of times that a link experienced protection -switchover. - """ - 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="protection-switches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """protection_switches must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-switches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__protection_switches = t - if hasattr(self, '_set'): - self._set() - - def _unset_protection_switches(self): - self.__protection_switches = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-switches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_protection_reverts(self): - """ - Getter method for protection_reverts, mapped from YANG variable /networks/network/link/te/statistics/protection_reverts (yang:counter32) - - YANG Description: Number of times that a link experienced protection -reversion. - """ - return self.__protection_reverts - - def _set_protection_reverts(self, v, load=False): - """ - Setter method for protection_reverts, mapped from YANG variable /networks/network/link/te/statistics/protection_reverts (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_protection_reverts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_protection_reverts() directly. - - YANG Description: Number of times that a link experienced protection -reversion. - """ - 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="protection-reverts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """protection_reverts must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-reverts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__protection_reverts = t - if hasattr(self, '_set'): - self._set() - - def _unset_protection_reverts(self): - self.__protection_reverts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-reverts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_restoration_failures(self): - """ - Getter method for restoration_failures, mapped from YANG variable /networks/network/link/te/statistics/restoration_failures (yang:counter32) - - YANG Description: Number of times that a link experienced restoration -failure. - """ - return self.__restoration_failures - - def _set_restoration_failures(self, v, load=False): - """ - Setter method for restoration_failures, mapped from YANG variable /networks/network/link/te/statistics/restoration_failures (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_restoration_failures is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restoration_failures() directly. - - YANG Description: Number of times that a link experienced restoration -failure. - """ - 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="restoration-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restoration_failures must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__restoration_failures = t - if hasattr(self, '_set'): - self._set() - - def _unset_restoration_failures(self): - self.__restoration_failures = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_restoration_starts(self): - """ - Getter method for restoration_starts, mapped from YANG variable /networks/network/link/te/statistics/restoration_starts (yang:counter32) - - YANG Description: Number of times that a link experienced restoration -start. - """ - return self.__restoration_starts - - def _set_restoration_starts(self, v, load=False): - """ - Setter method for restoration_starts, mapped from YANG variable /networks/network/link/te/statistics/restoration_starts (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_restoration_starts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restoration_starts() directly. - - YANG Description: Number of times that a link experienced restoration -start. - """ - 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="restoration-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restoration_starts must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__restoration_starts = t - if hasattr(self, '_set'): - self._set() - - def _unset_restoration_starts(self): - self.__restoration_starts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_restoration_successes(self): - """ - Getter method for restoration_successes, mapped from YANG variable /networks/network/link/te/statistics/restoration_successes (yang:counter32) - - YANG Description: Number of times that a link experienced restoration -success. - """ - return self.__restoration_successes - - def _set_restoration_successes(self, v, load=False): - """ - Setter method for restoration_successes, mapped from YANG variable /networks/network/link/te/statistics/restoration_successes (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_restoration_successes is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restoration_successes() directly. - - YANG Description: Number of times that a link experienced restoration -success. - """ - 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="restoration-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restoration_successes must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__restoration_successes = t - if hasattr(self, '_set'): - self._set() - - def _unset_restoration_successes(self): - self.__restoration_successes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_restoration_reversion_failures(self): - """ - Getter method for restoration_reversion_failures, mapped from YANG variable /networks/network/link/te/statistics/restoration_reversion_failures (yang:counter32) - - YANG Description: Number of times that a link experienced restoration -reversion failure. - """ - return self.__restoration_reversion_failures - - def _set_restoration_reversion_failures(self, v, load=False): - """ - Setter method for restoration_reversion_failures, mapped from YANG variable /networks/network/link/te/statistics/restoration_reversion_failures (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_restoration_reversion_failures is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restoration_reversion_failures() directly. - - YANG Description: Number of times that a link experienced restoration -reversion failure. - """ - 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="restoration-reversion-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restoration_reversion_failures must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__restoration_reversion_failures = t - if hasattr(self, '_set'): - self._set() - - def _unset_restoration_reversion_failures(self): - self.__restoration_reversion_failures = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_restoration_reversion_starts(self): - """ - Getter method for restoration_reversion_starts, mapped from YANG variable /networks/network/link/te/statistics/restoration_reversion_starts (yang:counter32) - - YANG Description: Number of times that a link experienced restoration -reversion start. - """ - return self.__restoration_reversion_starts - - def _set_restoration_reversion_starts(self, v, load=False): - """ - Setter method for restoration_reversion_starts, mapped from YANG variable /networks/network/link/te/statistics/restoration_reversion_starts (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_restoration_reversion_starts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restoration_reversion_starts() directly. - - YANG Description: Number of times that a link experienced restoration -reversion start. - """ - 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="restoration-reversion-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restoration_reversion_starts must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__restoration_reversion_starts = t - if hasattr(self, '_set'): - self._set() - - def _unset_restoration_reversion_starts(self): - self.__restoration_reversion_starts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_restoration_reversion_successes(self): - """ - Getter method for restoration_reversion_successes, mapped from YANG variable /networks/network/link/te/statistics/restoration_reversion_successes (yang:counter32) - - YANG Description: Number of times that a link experienced restoration -reversion success. - """ - return self.__restoration_reversion_successes - - def _set_restoration_reversion_successes(self, v, load=False): - """ - Setter method for restoration_reversion_successes, mapped from YANG variable /networks/network/link/te/statistics/restoration_reversion_successes (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_restoration_reversion_successes is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restoration_reversion_successes() directly. - - YANG Description: Number of times that a link experienced restoration -reversion success. - """ - 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="restoration-reversion-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restoration_reversion_successes must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__restoration_reversion_successes = t - if hasattr(self, '_set'): - self._set() - - def _unset_restoration_reversion_successes(self): - self.__restoration_reversion_successes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - discontinuity_time = __builtin__.property(_get_discontinuity_time) - disables = __builtin__.property(_get_disables) - enables = __builtin__.property(_get_enables) - maintenance_clears = __builtin__.property(_get_maintenance_clears) - maintenance_sets = __builtin__.property(_get_maintenance_sets) - modifies = __builtin__.property(_get_modifies) - downs = __builtin__.property(_get_downs) - ups = __builtin__.property(_get_ups) - fault_clears = __builtin__.property(_get_fault_clears) - fault_detects = __builtin__.property(_get_fault_detects) - protection_switches = __builtin__.property(_get_protection_switches) - protection_reverts = __builtin__.property(_get_protection_reverts) - restoration_failures = __builtin__.property(_get_restoration_failures) - restoration_starts = __builtin__.property(_get_restoration_starts) - restoration_successes = __builtin__.property(_get_restoration_successes) - restoration_reversion_failures = __builtin__.property(_get_restoration_reversion_failures) - restoration_reversion_starts = __builtin__.property(_get_restoration_reversion_starts) - restoration_reversion_successes = __builtin__.property(_get_restoration_reversion_successes) - - - _pyangbind_elements = OrderedDict([('discontinuity_time', discontinuity_time), ('disables', disables), ('enables', enables), ('maintenance_clears', maintenance_clears), ('maintenance_sets', maintenance_sets), ('modifies', modifies), ('downs', downs), ('ups', ups), ('fault_clears', fault_clears), ('fault_detects', fault_detects), ('protection_switches', protection_switches), ('protection_reverts', protection_reverts), ('restoration_failures', restoration_failures), ('restoration_starts', restoration_starts), ('restoration_successes', restoration_successes), ('restoration_reversion_failures', restoration_reversion_failures), ('restoration_reversion_starts', restoration_reversion_starts), ('restoration_reversion_successes', restoration_reversion_successes), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/__init__.py deleted file mode 100644 index f83e385c4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/__init__.py +++ /dev/null @@ -1,938 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import external_domain -from . import underlay -from . import interface_switching_capability -from . import label_restrictions -from . import max_link_bandwidth -from . import max_resv_link_bandwidth -from . import unreserved_bandwidth -from . import te_srlgs -from . import te_nsrlgs -from . import otn_link -from . import client_svc -class te_link_attributes(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Link attributes in a TE topology. - """ - __slots__ = ('_path_helper', '_extmethods', '__access_type','__external_domain','__is_abstract','__name','__underlay','__admin_status','__link_index','__administrative_group','__interface_switching_capability','__label_restrictions','__link_protection_type','__max_link_bandwidth','__max_resv_link_bandwidth','__unreserved_bandwidth','__te_default_metric','__te_delay_metric','__te_igp_metric','__te_srlgs','__te_nsrlgs','__otn_link','__client_svc',) - - _yang_name = 'te-link-attributes' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__access_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True) - self.__external_domain = YANGDynClass(base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - self.__link_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - self.__administrative_group = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True) - self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__link_protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__max_link_bandwidth = YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__max_resv_link_bandwidth = YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__te_default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__te_delay_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__te_igp_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__te_srlgs = YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__te_nsrlgs = YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__otn_link = YANGDynClass(base=otn_link.otn_link, is_container='container', yang_name="otn-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__client_svc = YANGDynClass(base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes'] - - def _get_access_type(self): - """ - Getter method for access_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/access_type (te-types:te-link-access-type) - - YANG Description: Link access type, which can be point-to-point or -multi-access. - """ - return self.__access_type - - def _set_access_type(self, v, load=False): - """ - Setter method for access_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/access_type (te-types:te-link-access-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_access_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_access_type() directly. - - YANG Description: Link access type, which can be point-to-point or -multi-access. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """access_type must be of a type compatible with te-types:te-link-access-type""", - 'defined-type': "te-types:te-link-access-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True)""", - }) - - self.__access_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_access_type(self): - self.__access_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True) - - - def _get_external_domain(self): - """ - Getter method for external_domain, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain (container) - - YANG Description: For an inter-domain link, specifies the attributes of -the remote end of the link, to facilitate the signaling at -the local end. - """ - return self.__external_domain - - def _set_external_domain(self, v, load=False): - """ - Setter method for external_domain, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_external_domain is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_external_domain() directly. - - YANG Description: For an inter-domain link, specifies the attributes of -the remote end of the link, to facilitate the signaling at -the local end. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """external_domain must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__external_domain = t - if hasattr(self, '_set'): - self._set() - - def _unset_external_domain(self): - self.__external_domain = YANGDynClass(base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_is_abstract(self): - """ - Getter method for is_abstract, mapped from YANG variable /networks/network/link/te/te_link_attributes/is_abstract (empty) - - YANG Description: Present if the link is abstract. - """ - return self.__is_abstract - - def _set_is_abstract(self, v, load=False): - """ - Setter method for is_abstract, mapped from YANG variable /networks/network/link/te/te_link_attributes/is_abstract (empty) - If this variable is read-only (config: false) in the - source YANG file, then _set_is_abstract is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_is_abstract() directly. - - YANG Description: Present if the link is abstract. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """is_abstract must be of a type compatible with empty""", - 'defined-type': "empty", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True)""", - }) - - self.__is_abstract = t - if hasattr(self, '_set'): - self._set() - - def _unset_is_abstract(self): - self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) - - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/link/te/te_link_attributes/name (string) - - YANG Description: Link name. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/link/te/te_link_attributes/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Link name. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_underlay(self): - """ - Getter method for underlay, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay (container) - - YANG Description: Attributes of the TE link underlay. - """ - return self.__underlay - - def _set_underlay(self, v, load=False): - """ - Setter method for underlay, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_underlay is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_underlay() directly. - - YANG Description: Attributes of the TE link underlay. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """underlay must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__underlay = t - if hasattr(self, '_set'): - self._set() - - def _unset_underlay(self): - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_admin_status(self): - """ - Getter method for admin_status, mapped from YANG variable /networks/network/link/te/te_link_attributes/admin_status (te-types:te-admin-status) - - YANG Description: The administrative state of the link. - """ - return self.__admin_status - - def _set_admin_status(self, v, load=False): - """ - Setter method for admin_status, mapped from YANG variable /networks/network/link/te/te_link_attributes/admin_status (te-types:te-admin-status) - If this variable is read-only (config: false) in the - source YANG file, then _set_admin_status is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_admin_status() directly. - - YANG Description: The administrative state of the link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """admin_status must be of a type compatible with te-types:te-admin-status""", - 'defined-type': "te-types:te-admin-status", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True)""", - }) - - self.__admin_status = t - if hasattr(self, '_set'): - self._set() - - def _unset_admin_status(self): - self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - - - def _get_link_index(self): - """ - Getter method for link_index, mapped from YANG variable /networks/network/link/te/te_link_attributes/link_index (uint64) - - YANG Description: The link identifier. If OSPF is used, this object -represents an ospfLsdbID. If IS-IS is used, this object -represents an isisLSPID. If a locally configured link is -used, this object represents a unique value, which is -locally defined in a router. - """ - return self.__link_index - - def _set_link_index(self, v, load=False): - """ - Setter method for link_index, mapped from YANG variable /networks/network/link/te/te_link_attributes/link_index (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_index() directly. - - YANG Description: The link identifier. If OSPF is used, this object -represents an ospfLsdbID. If IS-IS is used, this object -represents an isisLSPID. If a locally configured link is -used, this object represents a unique value, which is -locally defined in a router. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_index must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__link_index = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_index(self): - self.__link_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - - - def _get_administrative_group(self): - """ - Getter method for administrative_group, mapped from YANG variable /networks/network/link/te/te_link_attributes/administrative_group (te-types:admin-groups) - - YANG Description: Administrative group or color of the link. -This attribute covers both administrative groups (defined -in RFCs 3630 and 5305) and Extended Administrative Groups -(defined in RFC 7308). - """ - return self.__administrative_group - - def _set_administrative_group(self, v, load=False): - """ - Setter method for administrative_group, mapped from YANG variable /networks/network/link/te/te_link_attributes/administrative_group (te-types:admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_administrative_group is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_administrative_group() directly. - - YANG Description: Administrative group or color of the link. -This attribute covers both administrative groups (defined -in RFCs 3630 and 5305) and Extended Administrative Groups -(defined in RFC 7308). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """administrative_group must be of a type compatible with te-types:admin-groups""", - 'defined-type': "te-types:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True)""", - }) - - self.__administrative_group = t - if hasattr(self, '_set'): - self._set() - - def _unset_administrative_group(self): - self.__administrative_group = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True) - - - def _get_interface_switching_capability(self): - """ - Getter method for interface_switching_capability, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability (list) - - YANG Description: List of ISCDs for this link. - """ - return self.__interface_switching_capability - - def _set_interface_switching_capability(self, v, load=False): - """ - Setter method for interface_switching_capability, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_interface_switching_capability is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_interface_switching_capability() directly. - - YANG Description: List of ISCDs for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """interface_switching_capability must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__interface_switching_capability = t - if hasattr(self, '_set'): - self._set() - - def _unset_interface_switching_capability(self): - self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_label_restrictions(self): - """ - Getter method for label_restrictions, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions (container) - - YANG Description: The label restrictions container. - """ - return self.__label_restrictions - - def _set_label_restrictions(self, v, load=False): - """ - Setter method for label_restrictions, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restrictions is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restrictions() directly. - - YANG Description: The label restrictions container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restrictions must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_restrictions = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restrictions(self): - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_link_protection_type(self): - """ - Getter method for link_protection_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/link_protection_type (identityref) - - YANG Description: Link Protection Type desired for this link. - """ - return self.__link_protection_type - - def _set_link_protection_type(self, v, load=False): - """ - Setter method for link_protection_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/link_protection_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_protection_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_protection_type() directly. - - YANG Description: Link Protection Type desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_protection_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__link_protection_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_protection_type(self): - self.__link_protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_max_link_bandwidth(self): - """ - Getter method for max_link_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth (container) - - YANG Description: Maximum bandwidth that can be seen on this link in this -direction. Units are in bytes per second. - """ - return self.__max_link_bandwidth - - def _set_max_link_bandwidth(self, v, load=False): - """ - Setter method for max_link_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_link_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_link_bandwidth() directly. - - YANG Description: Maximum bandwidth that can be seen on this link in this -direction. Units are in bytes per second. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_link_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__max_link_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_link_bandwidth(self): - self.__max_link_bandwidth = YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_max_resv_link_bandwidth(self): - """ - Getter method for max_resv_link_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth (container) - - YANG Description: Maximum amount of bandwidth that can be reserved in this -direction in this link. Units are in bytes per second. - """ - return self.__max_resv_link_bandwidth - - def _set_max_resv_link_bandwidth(self, v, load=False): - """ - Setter method for max_resv_link_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_resv_link_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_resv_link_bandwidth() directly. - - YANG Description: Maximum amount of bandwidth that can be reserved in this -direction in this link. Units are in bytes per second. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_resv_link_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__max_resv_link_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_resv_link_bandwidth(self): - self.__max_resv_link_bandwidth = YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unreserved_bandwidth(self): - """ - Getter method for unreserved_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth (list) - - YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in -bytes per second. - """ - return self.__unreserved_bandwidth - - def _set_unreserved_bandwidth(self, v, load=False): - """ - Setter method for unreserved_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_unreserved_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unreserved_bandwidth() directly. - - YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in -bytes per second. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unreserved_bandwidth must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__unreserved_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_unreserved_bandwidth(self): - self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_te_default_metric(self): - """ - Getter method for te_default_metric, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_default_metric (uint32) - - YANG Description: Traffic Engineering metric. - """ - return self.__te_default_metric - - def _set_te_default_metric(self, v, load=False): - """ - Setter method for te_default_metric, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_default_metric (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_default_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_default_metric() directly. - - YANG Description: Traffic Engineering metric. - """ - 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="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_default_metric 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="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__te_default_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_default_metric(self): - self.__te_default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_te_delay_metric(self): - """ - Getter method for te_delay_metric, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_delay_metric (uint32) - - YANG Description: Traffic Engineering delay metric. - """ - return self.__te_delay_metric - - def _set_te_delay_metric(self, v, load=False): - """ - Setter method for te_delay_metric, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_delay_metric (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_delay_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_delay_metric() directly. - - YANG Description: Traffic Engineering delay metric. - """ - 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="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_delay_metric 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="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__te_delay_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_delay_metric(self): - self.__te_delay_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_te_igp_metric(self): - """ - Getter method for te_igp_metric, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_igp_metric (uint32) - - YANG Description: IGP metric used for Traffic Engineering. - """ - return self.__te_igp_metric - - def _set_te_igp_metric(self, v, load=False): - """ - Setter method for te_igp_metric, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_igp_metric (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_igp_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_igp_metric() directly. - - YANG Description: IGP metric used for Traffic Engineering. - """ - 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="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_igp_metric 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="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__te_igp_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_igp_metric(self): - self.__te_igp_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_te_srlgs(self): - """ - Getter method for te_srlgs, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_srlgs (container) - - YANG Description: Contains a list of SRLGs. - """ - return self.__te_srlgs - - def _set_te_srlgs(self, v, load=False): - """ - Setter method for te_srlgs, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_srlgs (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_srlgs is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_srlgs() directly. - - YANG Description: Contains a list of SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_srlgs must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_srlgs = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_srlgs(self): - self.__te_srlgs = YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_te_nsrlgs(self): - """ - Getter method for te_nsrlgs, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_nsrlgs (container) - - YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). -When an abstract TE link is configured, this list specifies -the request that underlay TE paths need to be mutually -disjoint with other TE links in the same groups. - """ - return self.__te_nsrlgs - - def _set_te_nsrlgs(self, v, load=False): - """ - Setter method for te_nsrlgs, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_nsrlgs (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_nsrlgs is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_nsrlgs() directly. - - YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). -When an abstract TE link is configured, this list specifies -the request that underlay TE paths need to be mutually -disjoint with other TE links in the same groups. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_nsrlgs must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_nsrlgs = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_nsrlgs(self): - self.__te_nsrlgs = YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_otn_link(self): - """ - Getter method for otn_link, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link (container) - - YANG Description: Attributes of the OTN Link. - """ - return self.__otn_link - - def _set_otn_link(self, v, load=False): - """ - Setter method for otn_link, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn_link is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn_link() directly. - - YANG Description: Attributes of the OTN Link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn_link.otn_link, is_container='container', yang_name="otn-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn_link must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn_link.otn_link, is_container='container', yang_name="otn-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn_link = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn_link(self): - self.__otn_link = YANGDynClass(base=otn_link.otn_link, is_container='container', yang_name="otn-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_client_svc(self): - """ - Getter method for client_svc, mapped from YANG variable /networks/network/link/te/te_link_attributes/client_svc (container) - - YANG Description: Attributes of the Link supporting CBR client signals. - """ - return self.__client_svc - - def _set_client_svc(self, v, load=False): - """ - Setter method for client_svc, mapped from YANG variable /networks/network/link/te/te_link_attributes/client_svc (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_client_svc is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_client_svc() directly. - - YANG Description: Attributes of the Link supporting CBR client signals. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """client_svc must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__client_svc = t - if hasattr(self, '_set'): - self._set() - - def _unset_client_svc(self): - self.__client_svc = YANGDynClass(base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - access_type = __builtin__.property(_get_access_type, _set_access_type) - external_domain = __builtin__.property(_get_external_domain, _set_external_domain) - is_abstract = __builtin__.property(_get_is_abstract, _set_is_abstract) - name = __builtin__.property(_get_name, _set_name) - underlay = __builtin__.property(_get_underlay, _set_underlay) - admin_status = __builtin__.property(_get_admin_status, _set_admin_status) - link_index = __builtin__.property(_get_link_index, _set_link_index) - administrative_group = __builtin__.property(_get_administrative_group, _set_administrative_group) - interface_switching_capability = __builtin__.property(_get_interface_switching_capability, _set_interface_switching_capability) - label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) - link_protection_type = __builtin__.property(_get_link_protection_type, _set_link_protection_type) - max_link_bandwidth = __builtin__.property(_get_max_link_bandwidth, _set_max_link_bandwidth) - max_resv_link_bandwidth = __builtin__.property(_get_max_resv_link_bandwidth, _set_max_resv_link_bandwidth) - unreserved_bandwidth = __builtin__.property(_get_unreserved_bandwidth, _set_unreserved_bandwidth) - te_default_metric = __builtin__.property(_get_te_default_metric, _set_te_default_metric) - te_delay_metric = __builtin__.property(_get_te_delay_metric, _set_te_delay_metric) - te_igp_metric = __builtin__.property(_get_te_igp_metric, _set_te_igp_metric) - te_srlgs = __builtin__.property(_get_te_srlgs, _set_te_srlgs) - te_nsrlgs = __builtin__.property(_get_te_nsrlgs, _set_te_nsrlgs) - otn_link = __builtin__.property(_get_otn_link, _set_otn_link) - client_svc = __builtin__.property(_get_client_svc, _set_client_svc) - - - _pyangbind_elements = OrderedDict([('access_type', access_type), ('external_domain', external_domain), ('is_abstract', is_abstract), ('name', name), ('underlay', underlay), ('admin_status', admin_status), ('link_index', link_index), ('administrative_group', administrative_group), ('interface_switching_capability', interface_switching_capability), ('label_restrictions', label_restrictions), ('link_protection_type', link_protection_type), ('max_link_bandwidth', max_link_bandwidth), ('max_resv_link_bandwidth', max_resv_link_bandwidth), ('unreserved_bandwidth', unreserved_bandwidth), ('te_default_metric', te_default_metric), ('te_delay_metric', te_delay_metric), ('te_igp_metric', te_igp_metric), ('te_srlgs', te_srlgs), ('te_nsrlgs', te_nsrlgs), ('otn_link', otn_link), ('client_svc', client_svc), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/client_svc/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/client_svc/__init__.py deleted file mode 100644 index 69ba52bbc..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/client_svc/__init__.py +++ /dev/null @@ -1,115 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class client_svc(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/client-svc. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Attributes of the Link supporting CBR client signals. - """ - __slots__ = ('_path_helper', '_extmethods', '__supported_client_signal',) - - _yang_name = 'client-svc' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__supported_client_signal = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'client-svc'] - - def _get_supported_client_signal(self): - """ - Getter method for supported_client_signal, mapped from YANG variable /networks/network/link/te/te_link_attributes/client_svc/supported_client_signal (identityref) - - YANG Description: List of client signal types supported by the Link. - """ - return self.__supported_client_signal - - def _set_supported_client_signal(self, v, load=False): - """ - Setter method for supported_client_signal, mapped from YANG variable /networks/network/link/te/te_link_attributes/client_svc/supported_client_signal (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_supported_client_signal is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_supported_client_signal() directly. - - YANG Description: List of client signal types supported by the Link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """supported_client_signal must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__supported_client_signal = t - if hasattr(self, '_set'): - self._set() - - def _unset_supported_client_signal(self): - self.__supported_client_signal = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - supported_client_signal = __builtin__.property(_get_supported_client_signal, _set_supported_client_signal) - - - _pyangbind_elements = OrderedDict([('supported_client_signal', supported_client_signal), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py deleted file mode 100644 index adc0d23fb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py +++ /dev/null @@ -1,205 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class external_domain(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/external-domain. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: For an inter-domain link, specifies the attributes of -the remote end of the link, to facilitate the signaling at -the local end. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref','__remote_te_node_id','__remote_te_link_tp_id',) - - _yang_name = 'external-domain' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__remote_te_node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) - self.__remote_te_link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'external-domain'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_remote_te_node_id(self): - """ - Getter method for remote_te_node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain/remote_te_node_id (te-types:te-node-id) - - YANG Description: Remote TE node identifier, used together with -'remote-te-link-tp-id' to identify the remote Link -Termination Point (LTP) in a different domain. - """ - return self.__remote_te_node_id - - def _set_remote_te_node_id(self, v, load=False): - """ - Setter method for remote_te_node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain/remote_te_node_id (te-types:te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_remote_te_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_remote_te_node_id() directly. - - YANG Description: Remote TE node identifier, used together with -'remote-te-link-tp-id' to identify the remote Link -Termination Point (LTP) in a different domain. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """remote_te_node_id must be of a type compatible with te-types:te-node-id""", - 'defined-type': "te-types:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True)""", - }) - - self.__remote_te_node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_remote_te_node_id(self): - self.__remote_te_node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) - - - def _get_remote_te_link_tp_id(self): - """ - Getter method for remote_te_link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain/remote_te_link_tp_id (te-types:te-tp-id) - - YANG Description: Remote TE LTP identifier, used together with -'remote-te-node-id' to identify the remote LTP in a -different domain. - """ - return self.__remote_te_link_tp_id - - def _set_remote_te_link_tp_id(self, v, load=False): - """ - Setter method for remote_te_link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain/remote_te_link_tp_id (te-types:te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_remote_te_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_remote_te_link_tp_id() directly. - - YANG Description: Remote TE LTP identifier, used together with -'remote-te-node-id' to identify the remote LTP in a -different domain. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """remote_te_link_tp_id must be of a type compatible with te-types:te-tp-id""", - 'defined-type': "te-types:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True)""", - }) - - self.__remote_te_link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_remote_te_link_tp_id(self): - self.__remote_te_link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - remote_te_node_id = __builtin__.property(_get_remote_te_node_id, _set_remote_te_node_id) - remote_te_link_tp_id = __builtin__.property(_get_remote_te_link_tp_id, _set_remote_te_link_tp_id) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('remote_te_node_id', remote_te_node_id), ('remote_te_link_tp_id', remote_te_link_tp_id), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py deleted file mode 100644 index e999df8fd..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py +++ /dev/null @@ -1,206 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import max_lsp_bandwidth -class interface_switching_capability(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/interface-switching-capability. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of ISCDs for this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__switching_capability','__encoding','__max_lsp_bandwidth',) - - _yang_name = 'interface-switching-capability' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'interface-switching-capability'] - - def _get_switching_capability(self): - """ - Getter method for switching_capability, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/switching_capability (identityref) - - YANG Description: Switching capability for this interface. - """ - return self.__switching_capability - - def _set_switching_capability(self, v, load=False): - """ - Setter method for switching_capability, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/switching_capability (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_switching_capability is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_switching_capability() directly. - - YANG Description: Switching capability for this interface. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """switching_capability must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__switching_capability = t - if hasattr(self, '_set'): - self._set() - - def _unset_switching_capability(self): - self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_encoding(self): - """ - Getter method for encoding, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/encoding (identityref) - - YANG Description: Encoding supported by this interface. - """ - return self.__encoding - - def _set_encoding(self, v, load=False): - """ - Setter method for encoding, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/encoding (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_encoding is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_encoding() directly. - - YANG Description: Encoding supported by this interface. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """encoding must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__encoding = t - if hasattr(self, '_set'): - self._set() - - def _unset_encoding(self): - self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_max_lsp_bandwidth(self): - """ - Getter method for max_lsp_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth (list) - - YANG Description: Maximum Label Switched Path (LSP) bandwidth at -priorities 0-7. - """ - return self.__max_lsp_bandwidth - - def _set_max_lsp_bandwidth(self, v, load=False): - """ - Setter method for max_lsp_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_lsp_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_lsp_bandwidth() directly. - - YANG Description: Maximum Label Switched Path (LSP) bandwidth at -priorities 0-7. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_lsp_bandwidth must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__max_lsp_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_lsp_bandwidth(self): - self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - switching_capability = __builtin__.property(_get_switching_capability, _set_switching_capability) - encoding = __builtin__.property(_get_encoding, _set_encoding) - max_lsp_bandwidth = __builtin__.property(_get_max_lsp_bandwidth, _set_max_lsp_bandwidth) - - - _pyangbind_elements = OrderedDict([('switching_capability', switching_capability), ('encoding', encoding), ('max_lsp_bandwidth', max_lsp_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py deleted file mode 100644 index fd066564c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class max_lsp_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/interface-switching-capability/max-lsp-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum Label Switched Path (LSP) bandwidth at -priorities 0-7. - """ - __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) - - _yang_name = 'max-lsp-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'interface-switching-capability', 'max-lsp-bandwidth'] - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/priority (uint8) - - YANG Description: Priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority. - """ - 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=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - priority = __builtin__.property(_get_priority, _set_priority) - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py deleted file mode 100644 index ae1f4655b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/interface-switching-capability/max-lsp-bandwidth/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) - - YANG Description: Maximum bandwidth attributes for OTN paths. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Maximum bandwidth attributes for OTN paths. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py deleted file mode 100644 index 714d3fac7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,156 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/interface-switching-capability/max-lsp-bandwidth/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum bandwidth attributes for OTN paths. - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__max_ts_number',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth', 'otn'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_max_ts_number(self): - """ - Getter method for max_ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) - - YANG Description: The maximum number of Tributary Slots (TS) that could be -used by an ODUflex LSP. - """ - return self.__max_ts_number - - def _set_max_ts_number(self, v, load=False): - """ - Setter method for max_ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_ts_number() directly. - - YANG Description: The maximum number of Tributary Slots (TS) that could be -used by an ODUflex LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__max_ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_ts_number(self): - self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - max_ts_number = __builtin__.property(_get_max_ts_number, _set_max_ts_number) - - __choices__ = {'technology': {'otn': ['odu_type', 'max_ts_number']}} - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('max_ts_number', max_ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py deleted file mode 100644 index f4e44b0e9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restriction -class label_restrictions(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The label restrictions container. - """ - __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) - - _yang_name = 'label-restrictions' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions'] - - def _get_label_restriction(self): - """ - Getter method for label_restriction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction (list) - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - return self.__label_restriction - - def _set_label_restriction(self, v, load=False): - """ - Setter method for label_restriction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restriction() directly. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restriction must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__label_restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restriction(self): - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) - - - _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py deleted file mode 100644 index 44f081277..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py +++ /dev/null @@ -1,450 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_start -from . import label_end -from . import label_step -from . import otn_label_range -from . import ethernet_label_range -class label_restriction(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) - - _yang_name = 'label-restriction' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction'] - - def _get_restriction(self): - """ - Getter method for restriction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/restriction (enumeration) - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - return self.__restriction - - def _set_restriction(self, v, load=False): - """ - Setter method for restriction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/restriction (enumeration) - If this variable is read-only (config: false) in the - source YANG file, then _set_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restriction() directly. - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restriction must be of a type compatible with enumeration""", - 'defined-type': "ietf-te-topology:enumeration", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", - }) - - self.__restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_restriction(self): - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/index (uint32) - - YANG Description: The index of the label restriction list entry. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: The index of the label restriction list entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_label_start(self): - """ - Getter method for label_start, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start (container) - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - return self.__label_start - - def _set_label_start(self, v, load=False): - """ - Setter method for label_start, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_start is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_start() directly. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_start must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_start = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_start(self): - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_end(self): - """ - Getter method for label_end, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end (container) - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - return self.__label_end - - def _set_label_end(self, v, load=False): - """ - Setter method for label_end, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_end is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_end() directly. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_end must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_end = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_end(self): - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_step(self): - """ - Getter method for label_step, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step (container) - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - return self.__label_step - - def _set_label_step(self, v, load=False): - """ - Setter method for label_step, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_step() directly. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_step must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_step(self): - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_range_bitmap(self): - """ - Getter method for range_bitmap, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - return self.__range_bitmap - - def _set_range_bitmap(self, v, load=False): - """ - Setter method for range_bitmap, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_bitmap is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_bitmap() directly. - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", - 'defined-type': "yang:hex-string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", - }) - - self.__range_bitmap = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_bitmap(self): - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - - - def _get_otn_label_range(self): - """ - Getter method for otn_label_range, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range (container) - - YANG Description: Label range information for OTN. - """ - return self.__otn_label_range - - def _set_otn_label_range(self, v, load=False): - """ - Setter method for otn_label_range, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn_label_range() directly. - - YANG Description: Label range information for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn_label_range(self): - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_ethernet_label_range(self): - """ - Getter method for ethernet_label_range, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range (container) - - YANG Description: Ethernet-specific label range related information. - """ - return self.__ethernet_label_range - - def _set_ethernet_label_range(self, v, load=False): - """ - Setter method for ethernet_label_range, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_ethernet_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ethernet_label_range() directly. - - YANG Description: Ethernet-specific label range related information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ethernet_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__ethernet_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_ethernet_label_range(self): - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - restriction = __builtin__.property(_get_restriction, _set_restriction) - index = __builtin__.property(_get_index, _set_index) - label_start = __builtin__.property(_get_label_start, _set_label_start) - label_end = __builtin__.property(_get_label_end, _set_label_end) - label_step = __builtin__.property(_get_label_step, _set_label_step) - range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) - otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) - ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) - - - _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py deleted file mode 100644 index 52e6a65c1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ethernet_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/ethernet-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Ethernet-specific label range related information. - """ - __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) - - _yang_name = 'ethernet-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] - - def _get_tag_type(self): - """ - Getter method for tag_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - - YANG Description: VLAN tag type. - """ - return self.__tag_type - - def _set_tag_type(self, v, load=False): - """ - Setter method for tag_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_tag_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tag_type() directly. - - YANG Description: VLAN tag type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", - 'defined-type': "etht-types:eth-tag-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", - }) - - self.__tag_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tag_type(self): - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - - YANG Description: priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - - tag_type = __builtin__.property(_get_tag_type, _set_tag_type) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py deleted file mode 100644 index ac25e0634..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_end(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-end. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-end' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-end'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py deleted file mode 100644 index 67dde9052..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-end/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py deleted file mode 100644 index 24875829b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py deleted file mode 100644 index 65fb7f8e1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_start(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-start. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-start' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-start'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py deleted file mode 100644 index 4a68961e3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-start/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py deleted file mode 100644 index 082f89723..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py deleted file mode 100644 index 51201035a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class label_step(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-step. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) - - _yang_name = 'label-step' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-step'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/generic (int32) - - YANG Description: Label range step. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/generic (int32) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Label range step. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with int32""", - 'defined-type': "int32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn (container) - - YANG Description: Label step for OTN - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label step for OTN - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_step(self): - """ - Getter method for eth_step, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/eth_step (uint16) - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - return self.__eth_step - - def _set_eth_step(self, v, load=False): - """ - Setter method for eth_step, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/eth_step (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_step() directly. - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_step must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", - }) - - self.__eth_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_step(self): - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_step = __builtin__.property(_get_eth_step, _set_eth_step) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py deleted file mode 100644 index 1325a1afd..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-step/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label step for OTN - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py deleted file mode 100644 index b59c995b2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py +++ /dev/null @@ -1,256 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/otn-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label range information for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) - - _yang_name = 'otn-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'otn-label-range'] - - def _get_range_type(self): - """ - Getter method for range_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - return self.__range_type - - def _set_range_type(self, v, load=False): - """ - Setter method for range_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_type() directly. - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_type must be of a type compatible with otn-label-range-type""", - 'defined-type': "ietf-otn-topology:otn-label-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", - }) - - self.__range_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_type(self): - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_odu_type_list(self): - """ - Getter method for odu_type_list, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - return self.__odu_type_list - - def _set_odu_type_list(self, v, load=False): - """ - Setter method for odu_type_list, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type_list() directly. - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type_list must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type_list(self): - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/priority (uint8) - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - - range_type = __builtin__.property(_get_range_type, _set_range_type) - tsg = __builtin__.property(_get_tsg, _set_tsg) - odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py deleted file mode 100644 index 566cf7799..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class max_link_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-link-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum bandwidth that can be seen on this link in this -direction. Units are in bytes per second. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth',) - - _yang_name = 'max-link-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-link-bandwidth'] - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py deleted file mode 100644 index c0e0c9a78..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-link-bandwidth/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-link-bandwidth', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py deleted file mode 100644 index 94132f930..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-link-bandwidth/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-link-bandwidth', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - - odulist = __builtin__.property(_get_odulist, _set_odulist) - - - _pyangbind_elements = OrderedDict([('odulist', odulist), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index 53a6ab873..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-link-bandwidth/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-link-bandwidth', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - number = __builtin__.property(_get_number, _set_number) - ts_number = __builtin__.property(_get_ts_number, _set_ts_number) - - - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py deleted file mode 100644 index 33d25351b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class max_resv_link_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-resv-link-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum amount of bandwidth that can be reserved in this -direction in this link. Units are in bytes per second. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth',) - - _yang_name = 'max-resv-link-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-resv-link-bandwidth'] - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py deleted file mode 100644 index 34072dafa..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-resv-link-bandwidth/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-resv-link-bandwidth', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py deleted file mode 100644 index 971708460..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-resv-link-bandwidth/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-resv-link-bandwidth', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - - odulist = __builtin__.property(_get_odulist, _set_odulist) - - - _pyangbind_elements = OrderedDict([('odulist', odulist), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index 8ee145707..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-resv-link-bandwidth/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-resv-link-bandwidth', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - number = __builtin__.property(_get_number, _set_number) - ts_number = __builtin__.property(_get_ts_number, _set_ts_number) - - - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/otn_link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/otn_link/__init__.py deleted file mode 100644 index 62dec2b89..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/otn_link/__init__.py +++ /dev/null @@ -1,199 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn_link(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/otn-link. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Attributes of the OTN Link. - """ - __slots__ = ('_path_helper', '_extmethods', '__odtu_flex_type','__tsg','__distance',) - - _yang_name = 'otn-link' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__distance = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint32', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'otn-link'] - - def _get_odtu_flex_type(self): - """ - Getter method for odtu_flex_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link/odtu_flex_type (l1-types:odtu-flex-type) - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs set up -on this OTN Link. - """ - return self.__odtu_flex_type - - def _set_odtu_flex_type(self, v, load=False): - """ - Setter method for odtu_flex_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link/odtu_flex_type (l1-types:odtu-flex-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_odtu_flex_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odtu_flex_type() directly. - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs set up -on this OTN Link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", - 'defined-type': "l1-types:odtu-flex-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", - }) - - self.__odtu_flex_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odtu_flex_type(self): - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link/tsg (identityref) - - YANG Description: Tributary slot granularity. - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary slot granularity. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_distance(self): - """ - Getter method for distance, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link/distance (uint32) - - YANG Description: distance in the unit of kilometers - """ - return self.__distance - - def _set_distance(self, v, load=False): - """ - Setter method for distance, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link/distance (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_distance is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_distance() directly. - - YANG Description: distance in the unit of kilometers - """ - 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="distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """distance 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="distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint32', is_config=True)""", - }) - - self.__distance = t - if hasattr(self, '_set'): - self._set() - - def _unset_distance(self): - self.__distance = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint32', is_config=True) - - odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) - tsg = __builtin__.property(_get_tsg, _set_tsg) - distance = __builtin__.property(_get_distance, _set_distance) - - - _pyangbind_elements = OrderedDict([('odtu_flex_type', odtu_flex_type), ('tsg', tsg), ('distance', distance), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py deleted file mode 100644 index 51926d313..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class te_nsrlgs(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/te-nsrlgs. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). -When an abstract TE link is configured, this list specifies -the request that underlay TE paths need to be mutually -disjoint with other TE links in the same groups. - """ - __slots__ = ('_path_helper', '_extmethods', '__id',) - - _yang_name = 'te-nsrlgs' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'te-nsrlgs'] - - def _get_id(self): - """ - Getter method for id, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_nsrlgs/id (uint32) - - YANG Description: NSRLG ID, uniquely configured within a topology. - """ - return self.__id - - def _set_id(self, v, load=False): - """ - Setter method for id, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_nsrlgs/id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_id() directly. - - YANG Description: NSRLG ID, uniquely configured within a topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """id must be of a type compatible with uint32""", - 'defined-type': "uint32", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__id = t - if hasattr(self, '_set'): - self._set() - - def _unset_id(self): - self.__id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - id = __builtin__.property(_get_id, _set_id) - - - _pyangbind_elements = OrderedDict([('id', id), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py deleted file mode 100644 index 92ac61644..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py +++ /dev/null @@ -1,115 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class te_srlgs(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/te-srlgs. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains a list of SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__value',) - - _yang_name = 'te-srlgs' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'te-srlgs'] - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_srlgs/value (te-types:srlg) - - YANG Description: SRLG value. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_srlgs/value (te-types:srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: SRLG value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with te-types:srlg""", - 'defined-type': "te-types:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True) - - value = __builtin__.property(_get_value, _set_value) - - - _pyangbind_elements = OrderedDict([('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py deleted file mode 100644 index 129490e77..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py +++ /dev/null @@ -1,326 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import primary_path -from . import backup_path -from . import tunnel_termination_points -from . import tunnels -class underlay(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Attributes of the TE link underlay. - """ - __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) - - _yang_name = 'underlay' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay'] - - def _get_enabled(self): - """ - Getter method for enabled, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/enabled (boolean) - - YANG Description: 'true' if the underlay is enabled. -'false' if the underlay is disabled. - """ - return self.__enabled - - def _set_enabled(self, v, load=False): - """ - Setter method for enabled, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/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: 'true' if the underlay is enabled. -'false' if the underlay is 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_primary_path(self): - """ - Getter method for primary_path, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path (container) - - YANG Description: The service path on the underlay topology that -supports this link. - """ - return self.__primary_path - - def _set_primary_path(self, v, load=False): - """ - Setter method for primary_path, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_primary_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_primary_path() directly. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """primary_path must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__primary_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_primary_path(self): - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_backup_path(self): - """ - Getter method for backup_path, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path (list) - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - return self.__backup_path - - def _set_backup_path(self, v, load=False): - """ - Setter method for backup_path, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_backup_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_backup_path() directly. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """backup_path must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__backup_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_backup_path(self): - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_protection_type(self): - """ - Getter method for protection_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/protection_type (identityref) - - YANG Description: Underlay protection type desired for this link. - """ - return self.__protection_type - - def _set_protection_type(self, v, load=False): - """ - Setter method for protection_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/protection_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_protection_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_protection_type() directly. - - YANG Description: Underlay protection type desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """protection_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__protection_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_protection_type(self): - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_tunnel_termination_points(self): - """ - Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points (container) - - YANG Description: Underlay TTPs desired for this link. - """ - return self.__tunnel_termination_points - - def _set_tunnel_termination_points(self, v, load=False): - """ - Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_termination_points is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_termination_points() directly. - - YANG Description: Underlay TTPs desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_termination_points must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tunnel_termination_points = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_termination_points(self): - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_tunnels(self): - """ - Getter method for tunnels, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels (container) - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - return self.__tunnels - - def _set_tunnels(self, v, load=False): - """ - Setter method for tunnels, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnels is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnels() directly. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnels must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tunnels = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnels(self): - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - enabled = __builtin__.property(_get_enabled, _set_enabled) - primary_path = __builtin__.property(_get_primary_path, _set_primary_path) - backup_path = __builtin__.property(_get_backup_path, _set_backup_path) - protection_type = __builtin__.property(_get_protection_type, _set_protection_type) - tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points, _set_tunnel_termination_points) - tunnels = __builtin__.property(_get_tunnels, _set_tunnels) - - - _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py deleted file mode 100644 index 6e430aedb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py +++ /dev/null @@ -1,207 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class backup_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) - - _yang_name = 'backup-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/index (uint32) - - YANG Description: A sequence number to identify a backup path. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: A sequence number to identify a backup path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element (list) - - YANG Description: A list of path elements describing the backup service -path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the backup service -path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - path_element = __builtin__.property(_get_path_element, _set_path_element) - - - _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py deleted file mode 100644 index aca211807..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py +++ /dev/null @@ -1,321 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the backup service -path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index 361309573..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py deleted file mode 100644 index b9ec35dbe..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index 4e91ab131..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index fb2e02afe..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index 06923495d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index 246878177..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index 7b040726e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py deleted file mode 100644 index 2cbefb38a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class primary_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) - - _yang_name = 'primary-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element (list) - - YANG Description: A list of path elements describing the service path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the service path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - path_element = __builtin__.property(_get_path_element, _set_path_element) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py deleted file mode 100644 index d1f9ba7c6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py +++ /dev/null @@ -1,320 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the service path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index be898e3aa..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py deleted file mode 100644 index 46d140192..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index 3aee6e73b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 30e2c479a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index 88d8af789..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index fe386ce02..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index 130901543..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py deleted file mode 100644 index 6b516827d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel_termination_points(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/tunnel-termination-points. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TTPs desired for this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) - - _yang_name = 'tunnel-termination-points' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'tunnel-termination-points'] - - def _get_source(self): - """ - Getter method for source, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/source (binary) - - YANG Description: Source TTP identifier. - """ - return self.__source - - def _set_source(self, v, load=False): - """ - Setter method for source, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/source (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_source is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_source() directly. - - YANG Description: Source TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """source must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__source = t - if hasattr(self, '_set'): - self._set() - - def _unset_source(self): - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - - def _get_destination(self): - """ - Getter method for destination, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/destination (binary) - - YANG Description: Destination TTP identifier. - """ - return self.__destination - - def _set_destination(self, v, load=False): - """ - Setter method for destination, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/destination (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_destination is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_destination() directly. - - YANG Description: Destination TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """destination must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__destination = t - if hasattr(self, '_set'): - self._set() - - def _unset_destination(self): - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - source = __builtin__.property(_get_source, _set_source) - destination = __builtin__.property(_get_destination, _set_destination) - - - _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py deleted file mode 100644 index 4402db40e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py +++ /dev/null @@ -1,167 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tunnel -class tunnels(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/tunnels. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) - - _yang_name = 'tunnels' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'tunnels'] - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_tunnel(self): - """ - Getter method for tunnel, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel (list) - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - return self.__tunnel - - def _set_tunnel(self, v, load=False): - """ - Setter method for tunnel, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel() directly. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__tunnel = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel(self): - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - sharing = __builtin__.property(_get_sharing, _set_sharing) - tunnel = __builtin__.property(_get_tunnel, _set_tunnel) - - - _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py deleted file mode 100644 index bfd6fae3f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py +++ /dev/null @@ -1,170 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/tunnels/tunnel. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) - - _yang_name = 'tunnel' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'tunnels', 'tunnel'] - - def _get_tunnel_name(self): - """ - Getter method for tunnel_name, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/tunnel_name (string) - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - return self.__tunnel_name - - def _set_tunnel_name(self, v, load=False): - """ - Setter method for tunnel_name, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/tunnel_name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_name() directly. - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - 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=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__tunnel_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_name(self): - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - tunnel_name = __builtin__.property(_get_tunnel_name, _set_tunnel_name) - sharing = __builtin__.property(_get_sharing, _set_sharing) - - - _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py deleted file mode 100644 index 64b36f07a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class unreserved_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/unreserved-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in -bytes per second. - """ - __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) - - _yang_name = 'unreserved-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'unreserved-bandwidth'] - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/priority (uint8) - - YANG Description: Priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority. - """ - 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=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - priority = __builtin__.property(_get_priority, _set_priority) - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py deleted file mode 100644 index 597c65903..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/unreserved-bandwidth/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'unreserved-bandwidth', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py deleted file mode 100644 index 602ca2e1a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/unreserved-bandwidth/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'unreserved-bandwidth', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - - odulist = __builtin__.property(_get_odulist, _set_odulist) - - - _pyangbind_elements = OrderedDict([('odulist', odulist), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index 94ca139a6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/unreserved-bandwidth/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'link', 'te', 'te-link-attributes', 'unreserved-bandwidth', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - number = __builtin__.property(_get_number, _set_number) - ts_number = __builtin__.property(_get_ts_number, _set_ts_number) - - - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/underlay/__init__.py deleted file mode 100644 index f8ac511c0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/link/te/underlay/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class underlay(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/link/te/underlay. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: State attributes for the TE link underlay. - """ - __slots__ = ('_path_helper', '_extmethods', '__dynamic','__committed',) - - _yang_name = 'underlay' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__dynamic = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="dynamic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - self.__committed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="committed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', 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 ['networks', 'network', 'link', 'te', 'underlay'] - - def _get_dynamic(self): - """ - Getter method for dynamic, mapped from YANG variable /networks/network/link/te/underlay/dynamic (boolean) - - YANG Description: 'true' if the underlay is dynamically created. - """ - return self.__dynamic - - def _set_dynamic(self, v, load=False): - """ - Setter method for dynamic, mapped from YANG variable /networks/network/link/te/underlay/dynamic (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_dynamic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_dynamic() directly. - - YANG Description: 'true' if the underlay is dynamically created. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="dynamic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """dynamic must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="dynamic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", - }) - - self.__dynamic = t - if hasattr(self, '_set'): - self._set() - - def _unset_dynamic(self): - self.__dynamic = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="dynamic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - - - def _get_committed(self): - """ - Getter method for committed, mapped from YANG variable /networks/network/link/te/underlay/committed (boolean) - - YANG Description: 'true' if the underlay is committed. - """ - return self.__committed - - def _set_committed(self, v, load=False): - """ - Setter method for committed, mapped from YANG variable /networks/network/link/te/underlay/committed (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_committed is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_committed() directly. - - YANG Description: 'true' if the underlay is committed. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="committed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """committed must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="committed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", - }) - - self.__committed = t - if hasattr(self, '_set'): - self._set() - - def _unset_committed(self): - self.__committed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="committed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - - dynamic = __builtin__.property(_get_dynamic) - committed = __builtin__.property(_get_committed) - - - _pyangbind_elements = OrderedDict([('dynamic', dynamic), ('committed', committed), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/network_types/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/network_types/__init__.py deleted file mode 100644 index 75d12adce..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/network_types/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_topology -class network_types(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/network-types. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Serves as an augmentation target. -The network type is indicated through corresponding -presence containers augmented into this container. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_topology',) - - _yang_name = 'network-types' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_topology = YANGDynClass(base=te_topology.te_topology, is_container='container', yang_name="te-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'network-types'] - - def _get_te_topology(self): - """ - Getter method for te_topology, mapped from YANG variable /networks/network/network_types/te_topology (container) - - YANG Description: Its presence identifies the TE topology type. - """ - return self.__te_topology - - def _set_te_topology(self, v, load=False): - """ - Setter method for te_topology, mapped from YANG variable /networks/network/network_types/te_topology (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_topology is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_topology() directly. - - YANG Description: Its presence identifies the TE topology type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_topology.te_topology, is_container='container', yang_name="te-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_topology must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_topology.te_topology, is_container='container', yang_name="te-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_topology = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_topology(self): - self.__te_topology = YANGDynClass(base=te_topology.te_topology, is_container='container', yang_name="te-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_topology = __builtin__.property(_get_te_topology, _set_te_topology) - - - _pyangbind_elements = OrderedDict([('te_topology', te_topology), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/network_types/te_topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/network_types/te_topology/__init__.py deleted file mode 100644 index 0e986049c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/network_types/te_topology/__init__.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class te_topology(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/network-types/te-topology. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Its presence identifies the TE topology type. - """ - _pyangbind_elements = {} - - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/__init__.py deleted file mode 100644 index 11a249539..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/__init__.py +++ /dev/null @@ -1,291 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import supporting_node -from . import termination_point -from . import te -class node(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The inventory of nodes of this network. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__supporting_node','__termination_point','__te_node_id','__te',) - - _yang_name = 'node' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='node-id', is_config=True) - self.__supporting_node = YANGDynClass(base=YANGListType("network_ref node_ref",supporting_node.supporting_node, yang_name="supporting-node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref', extensions=None), is_container='list', yang_name="supporting-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) - self.__termination_point = YANGDynClass(base=YANGListType("tp_id",termination_point.termination_point, yang_name="termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tp-id', extensions=None), is_container='list', yang_name="termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) - self.__te_node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) - self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/node_id (node-id) - - YANG Description: Uniquely identifies a node within the containing -network. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/node_id (node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: Uniquely identifies a node within the containing -network. - """ - 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=six.text_type, is_leaf=True, yang_name="node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with node-id""", - 'defined-type': "ietf-network:node-id", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='node-id', is_config=True) - - - def _get_supporting_node(self): - """ - Getter method for supporting_node, mapped from YANG variable /networks/network/node/supporting_node (list) - - YANG Description: Represents another node that is in an underlay network -and that supports this node. Used to represent layering -structure. - """ - return self.__supporting_node - - def _set_supporting_node(self, v, load=False): - """ - Setter method for supporting_node, mapped from YANG variable /networks/network/node/supporting_node (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_supporting_node is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_supporting_node() directly. - - YANG Description: Represents another node that is in an underlay network -and that supports this node. Used to represent layering -structure. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("network_ref node_ref",supporting_node.supporting_node, yang_name="supporting-node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref', extensions=None), is_container='list', yang_name="supporting-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """supporting_node must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("network_ref node_ref",supporting_node.supporting_node, yang_name="supporting-node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref', extensions=None), is_container='list', yang_name="supporting-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True)""", - }) - - self.__supporting_node = t - if hasattr(self, '_set'): - self._set() - - def _unset_supporting_node(self): - self.__supporting_node = YANGDynClass(base=YANGListType("network_ref node_ref",supporting_node.supporting_node, yang_name="supporting-node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref', extensions=None), is_container='list', yang_name="supporting-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) - - - def _get_termination_point(self): - """ - Getter method for termination_point, mapped from YANG variable /networks/network/node/termination_point (list) - - YANG Description: A termination point can terminate a link. -Depending on the type of topology, a termination point -could, for example, refer to a port or an interface. - """ - return self.__termination_point - - def _set_termination_point(self, v, load=False): - """ - Setter method for termination_point, mapped from YANG variable /networks/network/node/termination_point (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_termination_point is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_termination_point() directly. - - YANG Description: A termination point can terminate a link. -Depending on the type of topology, a termination point -could, for example, refer to a port or an interface. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tp_id",termination_point.termination_point, yang_name="termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tp-id', extensions=None), is_container='list', yang_name="termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """termination_point must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tp_id",termination_point.termination_point, yang_name="termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tp-id', extensions=None), is_container='list', yang_name="termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True)""", - }) - - self.__termination_point = t - if hasattr(self, '_set'): - self._set() - - def _unset_termination_point(self): - self.__termination_point = YANGDynClass(base=YANGListType("tp_id",termination_point.termination_point, yang_name="termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tp-id', extensions=None), is_container='list', yang_name="termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) - - - def _get_te_node_id(self): - """ - Getter method for te_node_id, mapped from YANG variable /networks/network/node/te_node_id (te-types:te-node-id) - - YANG Description: The identifier of a node in the TE topology. -A node is specific to a topology to which it belongs. - """ - return self.__te_node_id - - def _set_te_node_id(self, v, load=False): - """ - Setter method for te_node_id, mapped from YANG variable /networks/network/node/te_node_id (te-types:te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. -A node is specific to a topology to which it belongs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_node_id must be of a type compatible with te-types:te-node-id""", - 'defined-type': "te-types:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True)""", - }) - - self.__te_node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_node_id(self): - self.__te_node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) - - - def _get_te(self): - """ - Getter method for te, mapped from YANG variable /networks/network/node/te (container) - - YANG Description: Indicates TE support. - """ - return self.__te - - def _set_te(self, v, load=False): - """ - Setter method for te, mapped from YANG variable /networks/network/node/te (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te() directly. - - YANG Description: Indicates TE support. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te = t - if hasattr(self, '_set'): - self._set() - - def _unset_te(self): - self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - supporting_node = __builtin__.property(_get_supporting_node, _set_supporting_node) - termination_point = __builtin__.property(_get_termination_point, _set_termination_point) - te_node_id = __builtin__.property(_get_te_node_id, _set_te_node_id) - te = __builtin__.property(_get_te, _set_te) - - - _pyangbind_elements = OrderedDict([('node_id', node_id), ('supporting_node', supporting_node), ('termination_point', termination_point), ('te_node_id', te_node_id), ('te', te), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/supporting_node/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/supporting_node/__init__.py deleted file mode 100644 index c4cd2fc8e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/supporting_node/__init__.py +++ /dev/null @@ -1,168 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class supporting_node(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/supporting-node. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Represents another node that is in an underlay network -and that supports this node. Used to represent layering -structure. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref','__node_ref',) - - _yang_name = 'supporting-node' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) - self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', 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 ['networks', 'network', 'node', 'supporting-node'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/supporting_node/network_ref (leafref) - - YANG Description: References the underlay network of which the -underlay node is a part. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/supporting_node/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: References the underlay network of which the -underlay node is a part. - """ - 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=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) - - - def _get_node_ref(self): - """ - Getter method for node_ref, mapped from YANG variable /networks/network/node/supporting_node/node_ref (leafref) - - YANG Description: References the underlay node itself. - """ - return self.__node_ref - - def _set_node_ref(self, v, load=False): - """ - Setter method for node_ref, mapped from YANG variable /networks/network/node/supporting_node/node_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_ref() directly. - - YANG Description: References the underlay node itself. - """ - 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=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True)""", - }) - - self.__node_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_ref(self): - self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - node_ref = __builtin__.property(_get_node_ref, _set_node_ref) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('node_ref', node_ref), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/__init__.py deleted file mode 100644 index 90adef961..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/__init__.py +++ /dev/null @@ -1,519 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_node_attributes -from . import geolocation -from . import information_source_state -from . import information_source_entry -from . import statistics -from . import tunnel_termination_point -class te(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Indicates TE support. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_node_template','__te_node_attributes','__oper_status','__geolocation','__is_multi_access_dr','__information_source','__information_source_instance','__information_source_state','__information_source_entry','__statistics','__tunnel_termination_point',) - - _yang_name = 'te' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_node_template = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__te_node_attributes = YANGDynClass(base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) - self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__is_multi_access_dr = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-multi-access-dr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) - self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) - self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__information_source_entry = YANGDynClass(base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__tunnel_termination_point = YANGDynClass(base=YANGListType("tunnel_tp_id",tunnel_termination_point.tunnel_termination_point, yang_name="tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-tp-id', extensions=None), is_container='list', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te'] - - def _get_te_node_template(self): - """ - Getter method for te_node_template, mapped from YANG variable /networks/network/node/te/te_node_template (leafref) - - YANG Description: The reference to a TE node template. - """ - return self.__te_node_template - - def _set_te_node_template(self, v, load=False): - """ - Setter method for te_node_template, mapped from YANG variable /networks/network/node/te/te_node_template (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_node_template is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_node_template() directly. - - YANG Description: The reference to a TE node template. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_node_template must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__te_node_template = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_node_template(self): - self.__te_node_template = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_te_node_attributes(self): - """ - Getter method for te_node_attributes, mapped from YANG variable /networks/network/node/te/te_node_attributes (container) - - YANG Description: Contains node attributes in a TE topology. - """ - return self.__te_node_attributes - - def _set_te_node_attributes(self, v, load=False): - """ - Setter method for te_node_attributes, mapped from YANG variable /networks/network/node/te/te_node_attributes (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_node_attributes is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_node_attributes() directly. - - YANG Description: Contains node attributes in a TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_node_attributes must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_node_attributes = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_node_attributes(self): - self.__te_node_attributes = YANGDynClass(base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_oper_status(self): - """ - Getter method for oper_status, mapped from YANG variable /networks/network/node/te/oper_status (te-types:te-oper-status) - - YANG Description: The current operational state of the node. - """ - return self.__oper_status - - def _set_oper_status(self, v, load=False): - """ - Setter method for oper_status, mapped from YANG variable /networks/network/node/te/oper_status (te-types:te-oper-status) - If this variable is read-only (config: false) in the - source YANG file, then _set_oper_status is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_oper_status() directly. - - YANG Description: The current operational state of the node. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """oper_status must be of a type compatible with te-types:te-oper-status""", - 'defined-type': "te-types:te-oper-status", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False)""", - }) - - self.__oper_status = t - if hasattr(self, '_set'): - self._set() - - def _unset_oper_status(self): - self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) - - - def _get_geolocation(self): - """ - Getter method for geolocation, mapped from YANG variable /networks/network/node/te/geolocation (container) - - YANG Description: Contains a GPS location. - """ - return self.__geolocation - - def _set_geolocation(self, v, load=False): - """ - Setter method for geolocation, mapped from YANG variable /networks/network/node/te/geolocation (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_geolocation is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_geolocation() directly. - - YANG Description: Contains a GPS location. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """geolocation must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__geolocation = t - if hasattr(self, '_set'): - self._set() - - def _unset_geolocation(self): - self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_is_multi_access_dr(self): - """ - Getter method for is_multi_access_dr, mapped from YANG variable /networks/network/node/te/is_multi_access_dr (empty) - - YANG Description: The presence of this attribute indicates that this TE node -is a pseudonode elected as a designated router. - """ - return self.__is_multi_access_dr - - def _set_is_multi_access_dr(self, v, load=False): - """ - Setter method for is_multi_access_dr, mapped from YANG variable /networks/network/node/te/is_multi_access_dr (empty) - If this variable is read-only (config: false) in the - source YANG file, then _set_is_multi_access_dr is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_is_multi_access_dr() directly. - - YANG Description: The presence of this attribute indicates that this TE node -is a pseudonode elected as a designated router. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-multi-access-dr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """is_multi_access_dr must be of a type compatible with empty""", - 'defined-type': "empty", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-multi-access-dr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False)""", - }) - - self.__is_multi_access_dr = t - if hasattr(self, '_set'): - self._set() - - def _unset_is_multi_access_dr(self): - self.__is_multi_access_dr = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-multi-access-dr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) - - - def _get_information_source(self): - """ - Getter method for information_source, mapped from YANG variable /networks/network/node/te/information_source (te-info-source) - - YANG Description: Indicates the type of information source. - """ - return self.__information_source - - def _set_information_source(self, v, load=False): - """ - Setter method for information_source, mapped from YANG variable /networks/network/node/te/information_source (te-info-source) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source() directly. - - YANG Description: Indicates the type of information source. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source must be of a type compatible with te-info-source""", - 'defined-type': "ietf-te-topology:te-info-source", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False)""", - }) - - self.__information_source = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source(self): - self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) - - - def _get_information_source_instance(self): - """ - Getter method for information_source_instance, mapped from YANG variable /networks/network/node/te/information_source_instance (string) - - YANG Description: The name indicating the instance of the information -source. - """ - return self.__information_source_instance - - def _set_information_source_instance(self, v, load=False): - """ - Setter method for information_source_instance, mapped from YANG variable /networks/network/node/te/information_source_instance (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source_instance is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source_instance() directly. - - YANG Description: The name indicating the instance of the information -source. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source_instance must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__information_source_instance = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source_instance(self): - self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_information_source_state(self): - """ - Getter method for information_source_state, mapped from YANG variable /networks/network/node/te/information_source_state (container) - - YANG Description: Contains state attributes related to the information -source. - """ - return self.__information_source_state - - def _set_information_source_state(self, v, load=False): - """ - Setter method for information_source_state, mapped from YANG variable /networks/network/node/te/information_source_state (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source_state is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source_state() directly. - - YANG Description: Contains state attributes related to the information -source. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source_state must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__information_source_state = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source_state(self): - self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_information_source_entry(self): - """ - Getter method for information_source_entry, mapped from YANG variable /networks/network/node/te/information_source_entry (list) - - YANG Description: A list of information sources learned, including the source -that is used. - """ - return self.__information_source_entry - - def _set_information_source_entry(self, v, load=False): - """ - Setter method for information_source_entry, mapped from YANG variable /networks/network/node/te/information_source_entry (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source_entry is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source_entry() directly. - - YANG Description: A list of information sources learned, including the source -that is used. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source_entry must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__information_source_entry = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source_entry(self): - self.__information_source_entry = YANGDynClass(base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_statistics(self): - """ - Getter method for statistics, mapped from YANG variable /networks/network/node/te/statistics (container) - - YANG Description: Statistics data. - """ - return self.__statistics - - def _set_statistics(self, v, load=False): - """ - Setter method for statistics, mapped from YANG variable /networks/network/node/te/statistics (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_statistics is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_statistics() directly. - - YANG Description: Statistics data. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """statistics must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__statistics = t - if hasattr(self, '_set'): - self._set() - - def _unset_statistics(self): - self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_tunnel_termination_point(self): - """ - Getter method for tunnel_termination_point, mapped from YANG variable /networks/network/node/te/tunnel_termination_point (list) - - YANG Description: A termination point can terminate a tunnel. - """ - return self.__tunnel_termination_point - - def _set_tunnel_termination_point(self, v, load=False): - """ - Setter method for tunnel_termination_point, mapped from YANG variable /networks/network/node/te/tunnel_termination_point (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_termination_point is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_termination_point() directly. - - YANG Description: A termination point can terminate a tunnel. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tunnel_tp_id",tunnel_termination_point.tunnel_termination_point, yang_name="tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-tp-id', extensions=None), is_container='list', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_termination_point must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tunnel_tp_id",tunnel_termination_point.tunnel_termination_point, yang_name="tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-tp-id', extensions=None), is_container='list', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__tunnel_termination_point = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_termination_point(self): - self.__tunnel_termination_point = YANGDynClass(base=YANGListType("tunnel_tp_id",tunnel_termination_point.tunnel_termination_point, yang_name="tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-tp-id', extensions=None), is_container='list', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - te_node_template = __builtin__.property(_get_te_node_template, _set_te_node_template) - te_node_attributes = __builtin__.property(_get_te_node_attributes, _set_te_node_attributes) - oper_status = __builtin__.property(_get_oper_status) - geolocation = __builtin__.property(_get_geolocation) - is_multi_access_dr = __builtin__.property(_get_is_multi_access_dr) - information_source = __builtin__.property(_get_information_source) - information_source_instance = __builtin__.property(_get_information_source_instance) - information_source_state = __builtin__.property(_get_information_source_state) - information_source_entry = __builtin__.property(_get_information_source_entry) - statistics = __builtin__.property(_get_statistics) - tunnel_termination_point = __builtin__.property(_get_tunnel_termination_point, _set_tunnel_termination_point) - - - _pyangbind_elements = OrderedDict([('te_node_template', te_node_template), ('te_node_attributes', te_node_attributes), ('oper_status', oper_status), ('geolocation', geolocation), ('is_multi_access_dr', is_multi_access_dr), ('information_source', information_source), ('information_source_instance', information_source_instance), ('information_source_state', information_source_state), ('information_source_entry', information_source_entry), ('statistics', statistics), ('tunnel_termination_point', tunnel_termination_point), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/geolocation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/geolocation/__init__.py deleted file mode 100644 index f9e405188..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/geolocation/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class geolocation(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/geolocation. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains a GPS location. - """ - __slots__ = ('_path_helper', '_extmethods', '__altitude','__latitude','__longitude',) - - _yang_name = 'geolocation' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) - self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', 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 ['networks', 'network', 'node', 'te', 'geolocation'] - - def _get_altitude(self): - """ - Getter method for altitude, mapped from YANG variable /networks/network/node/te/geolocation/altitude (int64) - - YANG Description: Distance above sea level. - """ - return self.__altitude - - def _set_altitude(self, v, load=False): - """ - Setter method for altitude, mapped from YANG variable /networks/network/node/te/geolocation/altitude (int64) - If this variable is read-only (config: false) in the - source YANG file, then _set_altitude is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_altitude() directly. - - YANG Description: Distance above sea level. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """altitude must be of a type compatible with int64""", - 'defined-type': "int64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False)""", - }) - - self.__altitude = t - if hasattr(self, '_set'): - self._set() - - def _unset_altitude(self): - self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) - - - def _get_latitude(self): - """ - Getter method for latitude, mapped from YANG variable /networks/network/node/te/geolocation/latitude (geographic-coordinate-degree) - - YANG Description: Relative position north or south on the Earth's surface. - """ - return self.__latitude - - def _set_latitude(self, v, load=False): - """ - Setter method for latitude, mapped from YANG variable /networks/network/node/te/geolocation/latitude (geographic-coordinate-degree) - If this variable is read-only (config: false) in the - source YANG file, then _set_latitude is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_latitude() directly. - - YANG Description: Relative position north or south on the Earth's surface. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """latitude must be of a type compatible with geographic-coordinate-degree""", - 'defined-type': "ietf-te-topology:geographic-coordinate-degree", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", - }) - - self.__latitude = t - if hasattr(self, '_set'): - self._set() - - def _unset_latitude(self): - self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - - - def _get_longitude(self): - """ - Getter method for longitude, mapped from YANG variable /networks/network/node/te/geolocation/longitude (geographic-coordinate-degree) - - YANG Description: Angular distance east or west on the Earth's surface. - """ - return self.__longitude - - def _set_longitude(self, v, load=False): - """ - Setter method for longitude, mapped from YANG variable /networks/network/node/te/geolocation/longitude (geographic-coordinate-degree) - If this variable is read-only (config: false) in the - source YANG file, then _set_longitude is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_longitude() directly. - - YANG Description: Angular distance east or west on the Earth's surface. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """longitude must be of a type compatible with geographic-coordinate-degree""", - 'defined-type': "ietf-te-topology:geographic-coordinate-degree", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", - }) - - self.__longitude = t - if hasattr(self, '_set'): - self._set() - - def _unset_longitude(self): - self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - - altitude = __builtin__.property(_get_altitude) - latitude = __builtin__.property(_get_latitude) - longitude = __builtin__.property(_get_longitude) - - - _pyangbind_elements = OrderedDict([('altitude', altitude), ('latitude', latitude), ('longitude', longitude), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/__init__.py deleted file mode 100644 index 5e51769ff..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/__init__.py +++ /dev/null @@ -1,451 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import information_source_state -from . import connectivity_matrices -from . import underlay_topology -class information_source_entry(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of information sources learned, including the source -that is used. - """ - __slots__ = ('_path_helper', '_extmethods', '__information_source','__information_source_instance','__information_source_state','__connectivity_matrices','__domain_id','__is_abstract','__name','__signaling_address','__underlay_topology',) - - _yang_name = 'information-source-entry' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) - self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__connectivity_matrices = YANGDynClass(base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__domain_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__signaling_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=False) - self.__underlay_topology = YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry'] - - def _get_information_source(self): - """ - Getter method for information_source, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source (te-info-source) - - YANG Description: Indicates the type of information source. - """ - return self.__information_source - - def _set_information_source(self, v, load=False): - """ - Setter method for information_source, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source (te-info-source) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source() directly. - - YANG Description: Indicates the type of information source. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source must be of a type compatible with te-info-source""", - 'defined-type': "ietf-te-topology:te-info-source", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False)""", - }) - - self.__information_source = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source(self): - self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) - - - def _get_information_source_instance(self): - """ - Getter method for information_source_instance, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_instance (string) - - YANG Description: The name indicating the instance of the information -source. - """ - return self.__information_source_instance - - def _set_information_source_instance(self, v, load=False): - """ - Setter method for information_source_instance, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_instance (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source_instance is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source_instance() directly. - - YANG Description: The name indicating the instance of the information -source. - """ - 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=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source_instance must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__information_source_instance = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source_instance(self): - self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_information_source_state(self): - """ - Getter method for information_source_state, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state (container) - - YANG Description: Contains state attributes related to the information -source. - """ - return self.__information_source_state - - def _set_information_source_state(self, v, load=False): - """ - Setter method for information_source_state, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_information_source_state is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_information_source_state() directly. - - YANG Description: Contains state attributes related to the information -source. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """information_source_state must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__information_source_state = t - if hasattr(self, '_set'): - self._set() - - def _unset_information_source_state(self): - self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_connectivity_matrices(self): - """ - Getter method for connectivity_matrices, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices (container) - - YANG Description: Contains a connectivity matrix on a TE node. - """ - return self.__connectivity_matrices - - def _set_connectivity_matrices(self, v, load=False): - """ - Setter method for connectivity_matrices, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_connectivity_matrices is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_connectivity_matrices() directly. - - YANG Description: Contains a connectivity matrix on a TE node. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """connectivity_matrices must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__connectivity_matrices = t - if hasattr(self, '_set'): - self._set() - - def _unset_connectivity_matrices(self): - self.__connectivity_matrices = YANGDynClass(base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_domain_id(self): - """ - Getter method for domain_id, mapped from YANG variable /networks/network/node/te/information_source_entry/domain_id (uint32) - - YANG Description: Identifies the domain to which this node belongs. -This attribute is used to support inter-domain links. - """ - return self.__domain_id - - def _set_domain_id(self, v, load=False): - """ - Setter method for domain_id, mapped from YANG variable /networks/network/node/te/information_source_entry/domain_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_domain_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_domain_id() directly. - - YANG Description: Identifies the domain to which this node belongs. -This attribute is used to support inter-domain links. - """ - 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="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """domain_id 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="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__domain_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_domain_id(self): - self.__domain_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_is_abstract(self): - """ - Getter method for is_abstract, mapped from YANG variable /networks/network/node/te/information_source_entry/is_abstract (empty) - - YANG Description: Present if the node is abstract; not present if the node -is actual. - """ - return self.__is_abstract - - def _set_is_abstract(self, v, load=False): - """ - Setter method for is_abstract, mapped from YANG variable /networks/network/node/te/information_source_entry/is_abstract (empty) - If this variable is read-only (config: false) in the - source YANG file, then _set_is_abstract is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_is_abstract() directly. - - YANG Description: Present if the node is abstract; not present if the node -is actual. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """is_abstract must be of a type compatible with empty""", - 'defined-type': "empty", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False)""", - }) - - self.__is_abstract = t - if hasattr(self, '_set'): - self._set() - - def _unset_is_abstract(self): - self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) - - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/name (string) - - YANG Description: Node name. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Node name. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_signaling_address(self): - """ - Getter method for signaling_address, mapped from YANG variable /networks/network/node/te/information_source_entry/signaling_address (inet:ip-address) - - YANG Description: The node's signaling address. - """ - return self.__signaling_address - - def _set_signaling_address(self, v, load=False): - """ - Setter method for signaling_address, mapped from YANG variable /networks/network/node/te/information_source_entry/signaling_address (inet:ip-address) - If this variable is read-only (config: false) in the - source YANG file, then _set_signaling_address is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_signaling_address() directly. - - YANG Description: The node's signaling address. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """signaling_address must be of a type compatible with inet:ip-address""", - 'defined-type': "inet:ip-address", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=False)""", - }) - - self.__signaling_address = t - if hasattr(self, '_set'): - self._set() - - def _unset_signaling_address(self): - self.__signaling_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=False) - - - def _get_underlay_topology(self): - """ - Getter method for underlay_topology, mapped from YANG variable /networks/network/node/te/information_source_entry/underlay_topology (container) - - YANG Description: When an abstract node encapsulates a topology, the -attributes in this container point to said topology. - """ - return self.__underlay_topology - - def _set_underlay_topology(self, v, load=False): - """ - Setter method for underlay_topology, mapped from YANG variable /networks/network/node/te/information_source_entry/underlay_topology (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_underlay_topology is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_underlay_topology() directly. - - YANG Description: When an abstract node encapsulates a topology, the -attributes in this container point to said topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """underlay_topology must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__underlay_topology = t - if hasattr(self, '_set'): - self._set() - - def _unset_underlay_topology(self): - self.__underlay_topology = YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - information_source = __builtin__.property(_get_information_source) - information_source_instance = __builtin__.property(_get_information_source_instance) - information_source_state = __builtin__.property(_get_information_source_state) - connectivity_matrices = __builtin__.property(_get_connectivity_matrices) - domain_id = __builtin__.property(_get_domain_id) - is_abstract = __builtin__.property(_get_is_abstract) - name = __builtin__.property(_get_name) - signaling_address = __builtin__.property(_get_signaling_address) - underlay_topology = __builtin__.property(_get_underlay_topology) - - - _pyangbind_elements = OrderedDict([('information_source', information_source), ('information_source_instance', information_source_instance), ('information_source_state', information_source_state), ('connectivity_matrices', connectivity_matrices), ('domain_id', domain_id), ('is_abstract', is_abstract), ('name', name), ('signaling_address', signaling_address), ('underlay_topology', underlay_topology), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py deleted file mode 100644 index a773758ba..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py +++ /dev/null @@ -1,412 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restrictions -from . import underlay -from . import path_constraints -from . import optimizations -from . import path_properties -from . import connectivity_matrix -class connectivity_matrices(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains a connectivity matrix on a TE node. - """ - __slots__ = ('_path_helper', '_extmethods', '__number_of_entries','__label_restrictions','__is_allowed','__underlay','__path_constraints','__optimizations','__path_properties','__connectivity_matrix',) - - _yang_name = 'connectivity-matrices' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__number_of_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__connectivity_matrix = YANGDynClass(base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices'] - - def _get_number_of_entries(self): - """ - Getter method for number_of_entries, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/number_of_entries (uint16) - - YANG Description: The number of connectivity matrix entries. -If this number is specified in the configuration request, -the number is the requested number of entries, which may -not all be listed in the list; -if this number is reported in the state data, -the number is the current number of operational entries. - """ - return self.__number_of_entries - - def _set_number_of_entries(self, v, load=False): - """ - Setter method for number_of_entries, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/number_of_entries (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number_of_entries is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number_of_entries() directly. - - YANG Description: The number of connectivity matrix entries. -If this number is specified in the configuration request, -the number is the requested number of entries, which may -not all be listed in the list; -if this number is reported in the state data, -the number is the current number of operational entries. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number_of_entries must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False)""", - }) - - self.__number_of_entries = t - if hasattr(self, '_set'): - self._set() - - def _unset_number_of_entries(self): - self.__number_of_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - - - def _get_label_restrictions(self): - """ - Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions (container) - - YANG Description: The label restrictions container. - """ - return self.__label_restrictions - - def _set_label_restrictions(self, v, load=False): - """ - Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restrictions is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restrictions() directly. - - YANG Description: The label restrictions container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restrictions must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_restrictions = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restrictions(self): - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_is_allowed(self): - """ - Getter method for is_allowed, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/is_allowed (boolean) - - YANG Description: 'true' - switching is allowed; -'false' - switching is disallowed. - """ - return self.__is_allowed - - def _set_is_allowed(self, v, load=False): - """ - Setter method for is_allowed, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/is_allowed (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_is_allowed is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_is_allowed() directly. - - YANG Description: 'true' - switching is allowed; -'false' - switching is disallowed. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """is_allowed must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", - }) - - self.__is_allowed = t - if hasattr(self, '_set'): - self._set() - - def _unset_is_allowed(self): - self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - - - def _get_underlay(self): - """ - Getter method for underlay, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay (container) - - YANG Description: Attributes of the TE link underlay. - """ - return self.__underlay - - def _set_underlay(self, v, load=False): - """ - Setter method for underlay, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_underlay is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_underlay() directly. - - YANG Description: Attributes of the TE link underlay. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """underlay must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__underlay = t - if hasattr(self, '_set'): - self._set() - - def _unset_underlay(self): - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_constraints(self): - """ - Getter method for path_constraints, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints (container) - - YANG Description: TE named path constraints container. - """ - return self.__path_constraints - - def _set_path_constraints(self, v, load=False): - """ - Setter method for path_constraints, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_constraints is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_constraints() directly. - - YANG Description: TE named path constraints container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_constraints must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_constraints = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_constraints(self): - self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_optimizations(self): - """ - Getter method for optimizations, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations (container) - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - return self.__optimizations - - def _set_optimizations(self, v, load=False): - """ - Setter method for optimizations, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_optimizations is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_optimizations() directly. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """optimizations must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__optimizations = t - if hasattr(self, '_set'): - self._set() - - def _unset_optimizations(self): - self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_properties(self): - """ - Getter method for path_properties, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties (container) - - YANG Description: The TE path properties. - """ - return self.__path_properties - - def _set_path_properties(self, v, load=False): - """ - Setter method for path_properties, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_properties is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_properties() directly. - - YANG Description: The TE path properties. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_properties must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_properties = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_properties(self): - self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_connectivity_matrix(self): - """ - Getter method for connectivity_matrix, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix (list) - - YANG Description: Represents a node's switching limitations, i.e., -limitations in the interconnecting network TE links -across the node. - """ - return self.__connectivity_matrix - - def _set_connectivity_matrix(self, v, load=False): - """ - Setter method for connectivity_matrix, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_connectivity_matrix is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_connectivity_matrix() directly. - - YANG Description: Represents a node's switching limitations, i.e., -limitations in the interconnecting network TE links -across the node. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """connectivity_matrix must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__connectivity_matrix = t - if hasattr(self, '_set'): - self._set() - - def _unset_connectivity_matrix(self): - self.__connectivity_matrix = YANGDynClass(base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - number_of_entries = __builtin__.property(_get_number_of_entries) - label_restrictions = __builtin__.property(_get_label_restrictions) - is_allowed = __builtin__.property(_get_is_allowed) - underlay = __builtin__.property(_get_underlay) - path_constraints = __builtin__.property(_get_path_constraints) - optimizations = __builtin__.property(_get_optimizations) - path_properties = __builtin__.property(_get_path_properties) - connectivity_matrix = __builtin__.property(_get_connectivity_matrix) - - - _pyangbind_elements = OrderedDict([('number_of_entries', number_of_entries), ('label_restrictions', label_restrictions), ('is_allowed', is_allowed), ('underlay', underlay), ('path_constraints', path_constraints), ('optimizations', optimizations), ('path_properties', path_properties), ('connectivity_matrix', connectivity_matrix), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py deleted file mode 100644 index edc6885b3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py +++ /dev/null @@ -1,405 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import from_ -from . import to -from . import underlay -from . import path_constraints -from . import optimizations -from . import path_properties -class connectivity_matrix(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Represents a node's switching limitations, i.e., -limitations in the interconnecting network TE links -across the node. - """ - __slots__ = ('_path_helper', '_extmethods', '__id','__from_','__to','__is_allowed','__underlay','__path_constraints','__optimizations','__path_properties',) - - _yang_name = 'connectivity-matrix' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__from_ = YANGDynClass(base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__to = YANGDynClass(base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix'] - - def _get_id(self): - """ - Getter method for id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/id (uint32) - - YANG Description: Identifies the connectivity matrix entry. - """ - return self.__id - - def _set_id(self, v, load=False): - """ - Setter method for id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_id() directly. - - YANG Description: Identifies the connectivity matrix entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """id 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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__id = t - if hasattr(self, '_set'): - self._set() - - def _unset_id(self): - self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_from_(self): - """ - Getter method for from_, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from (container) - - YANG Description: Reference to a source LTP. - """ - return self.__from_ - - def _set_from_(self, v, load=False): - """ - Setter method for from_, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_from_ is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_from_() directly. - - YANG Description: Reference to a source LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """from_ must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__from_ = t - if hasattr(self, '_set'): - self._set() - - def _unset_from_(self): - self.__from_ = YANGDynClass(base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_to(self): - """ - Getter method for to, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to (container) - - YANG Description: Reference to a destination LTP. - """ - return self.__to - - def _set_to(self, v, load=False): - """ - Setter method for to, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_to is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_to() directly. - - YANG Description: Reference to a destination LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """to must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__to = t - if hasattr(self, '_set'): - self._set() - - def _unset_to(self): - self.__to = YANGDynClass(base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_is_allowed(self): - """ - Getter method for is_allowed, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/is_allowed (boolean) - - YANG Description: 'true' - switching is allowed; -'false' - switching is disallowed. - """ - return self.__is_allowed - - def _set_is_allowed(self, v, load=False): - """ - Setter method for is_allowed, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/is_allowed (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_is_allowed is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_is_allowed() directly. - - YANG Description: 'true' - switching is allowed; -'false' - switching is disallowed. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """is_allowed must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", - }) - - self.__is_allowed = t - if hasattr(self, '_set'): - self._set() - - def _unset_is_allowed(self): - self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - - - def _get_underlay(self): - """ - Getter method for underlay, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay (container) - - YANG Description: Attributes of the TE link underlay. - """ - return self.__underlay - - def _set_underlay(self, v, load=False): - """ - Setter method for underlay, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_underlay is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_underlay() directly. - - YANG Description: Attributes of the TE link underlay. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """underlay must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__underlay = t - if hasattr(self, '_set'): - self._set() - - def _unset_underlay(self): - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_constraints(self): - """ - Getter method for path_constraints, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints (container) - - YANG Description: TE named path constraints container. - """ - return self.__path_constraints - - def _set_path_constraints(self, v, load=False): - """ - Setter method for path_constraints, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_constraints is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_constraints() directly. - - YANG Description: TE named path constraints container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_constraints must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_constraints = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_constraints(self): - self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_optimizations(self): - """ - Getter method for optimizations, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations (container) - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - return self.__optimizations - - def _set_optimizations(self, v, load=False): - """ - Setter method for optimizations, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_optimizations is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_optimizations() directly. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """optimizations must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__optimizations = t - if hasattr(self, '_set'): - self._set() - - def _unset_optimizations(self): - self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_properties(self): - """ - Getter method for path_properties, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties (container) - - YANG Description: The TE path properties. - """ - return self.__path_properties - - def _set_path_properties(self, v, load=False): - """ - Setter method for path_properties, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_properties is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_properties() directly. - - YANG Description: The TE path properties. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_properties must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_properties = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_properties(self): - self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - id = __builtin__.property(_get_id) - from_ = __builtin__.property(_get_from_) - to = __builtin__.property(_get_to) - is_allowed = __builtin__.property(_get_is_allowed) - underlay = __builtin__.property(_get_underlay) - path_constraints = __builtin__.property(_get_path_constraints) - optimizations = __builtin__.property(_get_optimizations) - path_properties = __builtin__.property(_get_path_properties) - - - _pyangbind_elements = OrderedDict([('id', id), ('from_', from_), ('to', to), ('is_allowed', is_allowed), ('underlay', underlay), ('path_constraints', path_constraints), ('optimizations', optimizations), ('path_properties', path_properties), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/__init__.py deleted file mode 100644 index 8769c9ff8..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/__init__.py +++ /dev/null @@ -1,155 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restrictions -class from_(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Reference to a source LTP. - """ - __slots__ = ('_path_helper', '_extmethods', '__tp_ref','__label_restrictions',) - - _yang_name = 'from' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from'] - - def _get_tp_ref(self): - """ - Getter method for tp_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/tp_ref (leafref) - - YANG Description: Relative reference to a termination point. - """ - return self.__tp_ref - - def _set_tp_ref(self, v, load=False): - """ - Setter method for tp_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/tp_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tp_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tp_ref() directly. - - YANG Description: Relative reference to a termination point. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tp_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__tp_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_tp_ref(self): - self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - - def _get_label_restrictions(self): - """ - Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions (container) - - YANG Description: The label restrictions container. - """ - return self.__label_restrictions - - def _set_label_restrictions(self, v, load=False): - """ - Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restrictions is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restrictions() directly. - - YANG Description: The label restrictions container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restrictions must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_restrictions = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restrictions(self): - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - tp_ref = __builtin__.property(_get_tp_ref) - label_restrictions = __builtin__.property(_get_label_restrictions) - - - _pyangbind_elements = OrderedDict([('tp_ref', tp_ref), ('label_restrictions', label_restrictions), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py deleted file mode 100644 index 90df40ae3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restriction -class label_restrictions(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The label restrictions container. - """ - __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) - - _yang_name = 'label-restrictions' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions'] - - def _get_label_restriction(self): - """ - Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction (list) - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - return self.__label_restriction - - def _set_label_restriction(self, v, load=False): - """ - Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restriction() directly. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restriction must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__label_restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restriction(self): - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - label_restriction = __builtin__.property(_get_label_restriction) - - - _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py deleted file mode 100644 index 325db1710..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py +++ /dev/null @@ -1,450 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_start -from . import label_end -from . import label_step -from . import otn_label_range -from . import ethernet_label_range -class label_restriction(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) - - _yang_name = 'label-restriction' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction'] - - def _get_restriction(self): - """ - Getter method for restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/restriction (enumeration) - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - return self.__restriction - - def _set_restriction(self, v, load=False): - """ - Setter method for restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/restriction (enumeration) - If this variable is read-only (config: false) in the - source YANG file, then _set_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restriction() directly. - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restriction must be of a type compatible with enumeration""", - 'defined-type': "ietf-te-topology:enumeration", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False)""", - }) - - self.__restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_restriction(self): - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) - - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/index (uint32) - - YANG Description: The index of the label restriction list entry. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: The index of the label restriction list entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_label_start(self): - """ - Getter method for label_start, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start (container) - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - return self.__label_start - - def _set_label_start(self, v, load=False): - """ - Setter method for label_start, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_start is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_start() directly. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_start must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_start = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_start(self): - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_end(self): - """ - Getter method for label_end, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end (container) - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - return self.__label_end - - def _set_label_end(self, v, load=False): - """ - Setter method for label_end, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_end is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_end() directly. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_end must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_end = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_end(self): - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_step(self): - """ - Getter method for label_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step (container) - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - return self.__label_step - - def _set_label_step(self, v, load=False): - """ - Setter method for label_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_step() directly. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_step must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_step(self): - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_range_bitmap(self): - """ - Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - return self.__range_bitmap - - def _set_range_bitmap(self, v, load=False): - """ - Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_bitmap is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_bitmap() directly. - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", - 'defined-type': "yang:hex-string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False)""", - }) - - self.__range_bitmap = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_bitmap(self): - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) - - - def _get_otn_label_range(self): - """ - Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range (container) - - YANG Description: Label range information for OTN. - """ - return self.__otn_label_range - - def _set_otn_label_range(self, v, load=False): - """ - Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn_label_range() directly. - - YANG Description: Label range information for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn_label_range(self): - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_ethernet_label_range(self): - """ - Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range (container) - - YANG Description: Ethernet-specific label range related information. - """ - return self.__ethernet_label_range - - def _set_ethernet_label_range(self, v, load=False): - """ - Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_ethernet_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ethernet_label_range() directly. - - YANG Description: Ethernet-specific label range related information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ethernet_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False)""", - }) - - self.__ethernet_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_ethernet_label_range(self): - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) - - restriction = __builtin__.property(_get_restriction) - index = __builtin__.property(_get_index) - label_start = __builtin__.property(_get_label_start) - label_end = __builtin__.property(_get_label_end) - label_step = __builtin__.property(_get_label_step) - range_bitmap = __builtin__.property(_get_range_bitmap) - otn_label_range = __builtin__.property(_get_otn_label_range) - ethernet_label_range = __builtin__.property(_get_ethernet_label_range) - - - _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py deleted file mode 100644 index ccc0a8bf9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ethernet_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/ethernet-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Ethernet-specific label range related information. - """ - __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) - - _yang_name = 'ethernet-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] - - def _get_tag_type(self): - """ - Getter method for tag_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - - YANG Description: VLAN tag type. - """ - return self.__tag_type - - def _set_tag_type(self, v, load=False): - """ - Setter method for tag_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_tag_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tag_type() directly. - - YANG Description: VLAN tag type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", - 'defined-type': "etht-types:eth-tag-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False)""", - }) - - self.__tag_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tag_type(self): - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - - YANG Description: priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) - - tag_type = __builtin__.property(_get_tag_type) - priority = __builtin__.property(_get_priority) - - - _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py deleted file mode 100644 index 8116db8f3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_end(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-end. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-end' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-end'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py deleted file mode 100644 index 7d689d60a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-end/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py deleted file mode 100644 index 3dbff3b16..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - - tpn = __builtin__.property(_get_tpn) - ts = __builtin__.property(_get_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py deleted file mode 100644 index c682b45e5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_start(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-start. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-start' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-start'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py deleted file mode 100644 index 3d28ae831..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-start/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py deleted file mode 100644 index 458413ca8..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - - tpn = __builtin__.property(_get_tpn) - ts = __builtin__.property(_get_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py deleted file mode 100644 index 817c68ae2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class label_step(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-step. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) - - _yang_name = 'label-step' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-step'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/generic (int32) - - YANG Description: Label range step. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/generic (int32) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Label range step. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with int32""", - 'defined-type': "int32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn (container) - - YANG Description: Label step for OTN - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label step for OTN - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_eth_step(self): - """ - Getter method for eth_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/eth_step (uint16) - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - return self.__eth_step - - def _set_eth_step(self, v, load=False): - """ - Setter method for eth_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/eth_step (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_step() directly. - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_step must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False)""", - }) - - self.__eth_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_step(self): - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - eth_step = __builtin__.property(_get_eth_step) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py deleted file mode 100644 index 715687de9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-step/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label step for OTN - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - - tpn = __builtin__.property(_get_tpn) - ts = __builtin__.property(_get_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py deleted file mode 100644 index 82fc8d6a1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py +++ /dev/null @@ -1,256 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/otn-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label range information for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) - - _yang_name = 'otn-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'otn-label-range'] - - def _get_range_type(self): - """ - Getter method for range_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - return self.__range_type - - def _set_range_type(self, v, load=False): - """ - Setter method for range_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_type() directly. - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_type must be of a type compatible with otn-label-range-type""", - 'defined-type': "ietf-otn-topology:otn-label-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False)""", - }) - - self.__range_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_type(self): - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_odu_type_list(self): - """ - Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - return self.__odu_type_list - - def _set_odu_type_list(self, v, load=False): - """ - Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type_list() directly. - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type_list must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__odu_type_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type_list(self): - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/priority (uint8) - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) - - range_type = __builtin__.property(_get_range_type) - tsg = __builtin__.property(_get_tsg) - odu_type_list = __builtin__.property(_get_odu_type_list) - priority = __builtin__.property(_get_priority) - - - _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py deleted file mode 100644 index ff0a5fab9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py +++ /dev/null @@ -1,199 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import optimization_metric -from . import tiebreakers -from . import objective_function -class optimizations(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - __slots__ = ('_path_helper', '_extmethods', '__optimization_metric','__tiebreakers','__objective_function',) - - _yang_name = 'optimizations' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations'] - - def _get_optimization_metric(self): - """ - Getter method for optimization_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric (list) - - YANG Description: TE path metric type. - """ - return self.__optimization_metric - - def _set_optimization_metric(self, v, load=False): - """ - Setter method for optimization_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_optimization_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_optimization_metric() directly. - - YANG Description: TE path metric type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """optimization_metric must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__optimization_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_optimization_metric(self): - self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_tiebreakers(self): - """ - Getter method for tiebreakers, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers (container) - - YANG Description: Container for the list of tiebreakers. - """ - return self.__tiebreakers - - def _set_tiebreakers(self, v, load=False): - """ - Setter method for tiebreakers, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreakers is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreakers() directly. - - YANG Description: Container for the list of tiebreakers. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreakers must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__tiebreakers = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreakers(self): - self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_objective_function(self): - """ - Getter method for objective_function, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function (container) - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - return self.__objective_function - - def _set_objective_function(self, v, load=False): - """ - Setter method for objective_function, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_objective_function is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_objective_function() directly. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """objective_function must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__objective_function = t - if hasattr(self, '_set'): - self._set() - - def _unset_objective_function(self): - self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - optimization_metric = __builtin__.property(_get_optimization_metric) - tiebreakers = __builtin__.property(_get_tiebreakers) - objective_function = __builtin__.property(_get_objective_function) - - __choices__ = {'algorithm': {'metric': ['optimization_metric', 'tiebreakers'], 'objective-function': ['objective_function']}} - _pyangbind_elements = OrderedDict([('optimization_metric', optimization_metric), ('tiebreakers', tiebreakers), ('objective_function', objective_function), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py deleted file mode 100644 index a9fdbbbf6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class objective_function(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/objective-function. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - __slots__ = ('_path_helper', '_extmethods', '__objective_function_type',) - - _yang_name = 'objective-function' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'objective-function'] - - def _get_objective_function_type(self): - """ - Getter method for objective_function_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/objective_function_type (identityref) - - YANG Description: Objective function entry. - """ - return self.__objective_function_type - - def _set_objective_function_type(self, v, load=False): - """ - Setter method for objective_function_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/objective_function_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_objective_function_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_objective_function_type() directly. - - YANG Description: Objective function entry. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """objective_function_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__objective_function_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_objective_function_type(self): - self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - objective_function_type = __builtin__.property(_get_objective_function_type) - - __choices__ = {'algorithm': {'objective-function': ['objective_function_type']}} - _pyangbind_elements = OrderedDict([('objective_function_type', objective_function_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py deleted file mode 100644 index 74c142e28..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py +++ /dev/null @@ -1,241 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import explicit_route_exclude_objects -from . import explicit_route_include_objects -class optimization_metric(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric type. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__weight','__explicit_route_exclude_objects','__explicit_route_include_objects',) - - _yang_name = 'optimization-metric' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/metric_type (identityref) - - YANG Description: Identifies the 'metric-type' that the path computation -process uses for optimization. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: Identifies the 'metric-type' that the path computation -process uses for optimization. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_weight(self): - """ - Getter method for weight, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/weight (uint8) - - YANG Description: TE path metric normalization weight. - """ - return self.__weight - - def _set_weight(self, v, load=False): - """ - Setter method for weight, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/weight (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_weight is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_weight() directly. - - YANG Description: TE path metric normalization weight. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """weight must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", - }) - - self.__weight = t - if hasattr(self, '_set'): - self._set() - - def _unset_weight(self): - self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - - - def _get_explicit_route_exclude_objects(self): - """ - Getter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects (container) - - YANG Description: Container for the 'exclude route' object list. - """ - return self.__explicit_route_exclude_objects - - def _set_explicit_route_exclude_objects(self, v, load=False): - """ - Setter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_explicit_route_exclude_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_explicit_route_exclude_objects() directly. - - YANG Description: Container for the 'exclude route' object list. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """explicit_route_exclude_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__explicit_route_exclude_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_explicit_route_exclude_objects(self): - self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_explicit_route_include_objects(self): - """ - Getter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects (container) - - YANG Description: Container for the 'include route' object list. - """ - return self.__explicit_route_include_objects - - def _set_explicit_route_include_objects(self, v, load=False): - """ - Setter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_explicit_route_include_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_explicit_route_include_objects() directly. - - YANG Description: Container for the 'include route' object list. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """explicit_route_include_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__explicit_route_include_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_explicit_route_include_objects(self): - self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - metric_type = __builtin__.property(_get_metric_type) - weight = __builtin__.property(_get_weight) - explicit_route_exclude_objects = __builtin__.property(_get_explicit_route_exclude_objects) - explicit_route_include_objects = __builtin__.property(_get_explicit_route_include_objects) - - __choices__ = {'algorithm': {'metric': ['metric_type', 'weight', 'explicit_route_exclude_objects', 'explicit_route_include_objects']}} - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('weight', weight), ('explicit_route_exclude_objects', explicit_route_exclude_objects), ('explicit_route_include_objects', explicit_route_include_objects), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py deleted file mode 100644 index ed88eea05..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import route_object_exclude_object -class explicit_route_exclude_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the 'exclude route' object list. - """ - __slots__ = ('_path_helper', '_extmethods', '__route_object_exclude_object',) - - _yang_name = 'explicit-route-exclude-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects'] - - def _get_route_object_exclude_object(self): - """ - Getter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - return self.__route_object_exclude_object - - def _set_route_object_exclude_object(self, v, load=False): - """ - Setter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_route_object_exclude_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_route_object_exclude_object() directly. - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """route_object_exclude_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__route_object_exclude_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_route_object_exclude_object(self): - self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - route_object_exclude_object = __builtin__.property(_get_route_object_exclude_object) - - __choices__ = {'algorithm': {'metric': ['route_object_exclude_object']}} - _pyangbind_elements = OrderedDict([('route_object_exclude_object', route_object_exclude_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py deleted file mode 100644 index ad5bff3e1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py +++ /dev/null @@ -1,365 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -from . import srlg -class route_object_exclude_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop','__srlg',) - - _yang_name = 'route-object-exclude-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_srlg(self): - """ - Getter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) - - YANG Description: SRLG container. - """ - return self.__srlg - - def _set_srlg(self, v, load=False): - """ - Setter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_srlg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_srlg() directly. - - YANG Description: SRLG container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """srlg must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__srlg = t - if hasattr(self, '_set'): - self._set() - - def _unset_srlg(self): - self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - index = __builtin__.property(_get_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - srlg = __builtin__.property(_get_srlg) - - __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop'], 'srlg': ['srlg']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ('srlg', srlg), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py deleted file mode 100644 index 40a38d18d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py deleted file mode 100644 index d86889be2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py deleted file mode 100644 index b404a2341..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index fbabbb174..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py deleted file mode 100644 index 4a9ce25d0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py deleted file mode 100644 index 81ae5ee3b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py deleted file mode 100644 index ba86eb284..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py +++ /dev/null @@ -1,115 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class srlg(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/srlg. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: SRLG container. - """ - __slots__ = ('_path_helper', '_extmethods', '__srlg',) - - _yang_name = 'srlg' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'srlg'] - - def _get_srlg(self): - """ - Getter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) - - YANG Description: SRLG value. - """ - return self.__srlg - - def _set_srlg(self, v, load=False): - """ - Setter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_srlg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_srlg() directly. - - YANG Description: SRLG value. - """ - 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="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """srlg 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="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__srlg = t - if hasattr(self, '_set'): - self._set() - - def _unset_srlg(self): - self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - srlg = __builtin__.property(_get_srlg) - - __choices__ = {'type': {'srlg': ['srlg']}} - _pyangbind_elements = OrderedDict([('srlg', srlg), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index edb8b9e25..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py deleted file mode 100644 index 21986a912..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import route_object_include_object -class explicit_route_include_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the 'include route' object list. - """ - __slots__ = ('_path_helper', '_extmethods', '__route_object_include_object',) - - _yang_name = 'explicit-route-include-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects'] - - def _get_route_object_include_object(self): - """ - Getter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - return self.__route_object_include_object - - def _set_route_object_include_object(self, v, load=False): - """ - Setter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_route_object_include_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_route_object_include_object() directly. - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """route_object_include_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__route_object_include_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_route_object_include_object(self): - self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - route_object_include_object = __builtin__.property(_get_route_object_include_object) - - __choices__ = {'algorithm': {'metric': ['route_object_include_object']}} - _pyangbind_elements = OrderedDict([('route_object_include_object', route_object_include_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py deleted file mode 100644 index 5140272ee..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py +++ /dev/null @@ -1,325 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class route_object_include_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'route-object-include-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - index = __builtin__.property(_get_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - - __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py deleted file mode 100644 index 0f65b4645..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py deleted file mode 100644 index 882e1f01a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py deleted file mode 100644 index 2dde61c31..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 784b431b6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py deleted file mode 100644 index 14455045c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py deleted file mode 100644 index 70eea9f9a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index eb61c881e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py deleted file mode 100644 index 8c6d93527..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tiebreaker -class tiebreakers(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/tiebreakers. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of tiebreakers. - """ - __slots__ = ('_path_helper', '_extmethods', '__tiebreaker',) - - _yang_name = 'tiebreakers' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'tiebreakers'] - - def _get_tiebreaker(self): - """ - Getter method for tiebreaker, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker (list) - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - return self.__tiebreaker - - def _set_tiebreaker(self, v, load=False): - """ - Setter method for tiebreaker, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreaker is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreaker() directly. - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreaker must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__tiebreaker = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreaker(self): - self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - tiebreaker = __builtin__.property(_get_tiebreaker) - - __choices__ = {'algorithm': {'metric': ['tiebreaker']}} - _pyangbind_elements = OrderedDict([('tiebreaker', tiebreaker), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py deleted file mode 100644 index 52b5c81b7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py +++ /dev/null @@ -1,122 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tiebreaker(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/tiebreakers/tiebreaker. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - __slots__ = ('_path_helper', '_extmethods', '__tiebreaker_type',) - - _yang_name = 'tiebreaker' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'tiebreakers', 'tiebreaker'] - - def _get_tiebreaker_type(self): - """ - Getter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) - - YANG Description: Identifies an entry in the list of tiebreakers. - """ - return self.__tiebreaker_type - - def _set_tiebreaker_type(self, v, load=False): - """ - Setter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreaker_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreaker_type() directly. - - YANG Description: Identifies an entry in the list of tiebreakers. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreaker_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tiebreaker_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreaker_type(self): - self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - tiebreaker_type = __builtin__.property(_get_tiebreaker_type) - - __choices__ = {'algorithm': {'metric': ['tiebreaker_type']}} - _pyangbind_elements = OrderedDict([('tiebreaker_type', tiebreaker_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py deleted file mode 100644 index 36a802786..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py +++ /dev/null @@ -1,523 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -from . import path_metric_bounds -from . import path_affinities_values -from . import path_affinity_names -from . import path_srlgs_lists -from . import path_srlgs_names -class path_constraints(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE named path constraints container. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth','__link_protection','__setup_priority','__hold_priority','__signaling_type','__path_metric_bounds','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__disjointness',) - - _yang_name = 'path-constraints' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints'] - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_link_protection(self): - """ - Getter method for link_protection, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/link_protection (identityref) - - YANG Description: Link protection type required for the links included -in the computed path. - """ - return self.__link_protection - - def _set_link_protection(self, v, load=False): - """ - Setter method for link_protection, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/link_protection (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_protection is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_protection() directly. - - YANG Description: Link protection type required for the links included -in the computed path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_protection must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__link_protection = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_protection(self): - self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_setup_priority(self): - """ - Getter method for setup_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/setup_priority (uint8) - - YANG Description: TE LSP requested setup priority. - """ - return self.__setup_priority - - def _set_setup_priority(self, v, load=False): - """ - Setter method for setup_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/setup_priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_setup_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_setup_priority() directly. - - YANG Description: TE LSP requested setup priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """setup_priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", - }) - - self.__setup_priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_setup_priority(self): - self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - - - def _get_hold_priority(self): - """ - Getter method for hold_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/hold_priority (uint8) - - YANG Description: TE LSP requested hold priority. - """ - return self.__hold_priority - - def _set_hold_priority(self, v, load=False): - """ - Setter method for hold_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/hold_priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_hold_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hold_priority() directly. - - YANG Description: TE LSP requested hold priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hold_priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", - }) - - self.__hold_priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_hold_priority(self): - self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - - - def _get_signaling_type(self): - """ - Getter method for signaling_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/signaling_type (identityref) - - YANG Description: TE tunnel path signaling type. - """ - return self.__signaling_type - - def _set_signaling_type(self, v, load=False): - """ - Setter method for signaling_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/signaling_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_signaling_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_signaling_type() directly. - - YANG Description: TE tunnel path signaling type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """signaling_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__signaling_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_signaling_type(self): - self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_path_metric_bounds(self): - """ - Getter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds (container) - - YANG Description: TE path metric bounds container. - """ - return self.__path_metric_bounds - - def _set_path_metric_bounds(self, v, load=False): - """ - Setter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric_bounds is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric_bounds() directly. - - YANG Description: TE path metric bounds container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric_bounds must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_metric_bounds = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric_bounds(self): - self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_affinities_values(self): - """ - Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values (container) - - YANG Description: Path affinities represented as values. - """ - return self.__path_affinities_values - - def _set_path_affinities_values(self, v, load=False): - """ - Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_values() directly. - - YANG Description: Path affinities represented as values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_values must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinities_values = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_values(self): - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_affinity_names(self): - """ - Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names (container) - - YANG Description: Path affinities represented as names. - """ - return self.__path_affinity_names - - def _set_path_affinity_names(self, v, load=False): - """ - Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_names() directly. - - YANG Description: Path affinities represented as names. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinity_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_names(self): - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_lists(self): - """ - Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists (container) - - YANG Description: Path SRLG properties container. - """ - return self.__path_srlgs_lists - - def _set_path_srlgs_lists(self, v, load=False): - """ - Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_lists is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_lists() directly. - - YANG Description: Path SRLG properties container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_lists must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_lists = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_lists(self): - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_names(self): - """ - Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names (container) - - YANG Description: Container for the list of named SRLGs. - """ - return self.__path_srlgs_names - - def _set_path_srlgs_names(self, v, load=False): - """ - Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_names() directly. - - YANG Description: Container for the list of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_names(self): - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_disjointness(self): - """ - Getter method for disjointness, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/disjointness (te-path-disjointness) - - YANG Description: The type of resource disjointness. -When configured for a primary path, the disjointness level -applies to all secondary LSPs. When configured for a -secondary path, the disjointness level overrides the level -configured for the primary path. - """ - return self.__disjointness - - def _set_disjointness(self, v, load=False): - """ - Setter method for disjointness, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/disjointness (te-path-disjointness) - If this variable is read-only (config: false) in the - source YANG file, then _set_disjointness is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_disjointness() directly. - - YANG Description: The type of resource disjointness. -When configured for a primary path, the disjointness level -applies to all secondary LSPs. When configured for a -secondary path, the disjointness level overrides the level -configured for the primary path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """disjointness must be of a type compatible with te-path-disjointness""", - 'defined-type': "ietf-te-topology:te-path-disjointness", - 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False)""", - }) - - self.__disjointness = t - if hasattr(self, '_set'): - self._set() - - def _unset_disjointness(self): - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False) - - te_bandwidth = __builtin__.property(_get_te_bandwidth) - link_protection = __builtin__.property(_get_link_protection) - setup_priority = __builtin__.property(_get_setup_priority) - hold_priority = __builtin__.property(_get_hold_priority) - signaling_type = __builtin__.property(_get_signaling_type) - path_metric_bounds = __builtin__.property(_get_path_metric_bounds) - path_affinities_values = __builtin__.property(_get_path_affinities_values) - path_affinity_names = __builtin__.property(_get_path_affinity_names) - path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) - path_srlgs_names = __builtin__.property(_get_path_srlgs_names) - disjointness = __builtin__.property(_get_disjointness) - - - _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ('link_protection', link_protection), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('signaling_type', signaling_type), ('path_metric_bounds', path_metric_bounds), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('disjointness', disjointness), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py deleted file mode 100644 index aec7be61a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinities_value -class path_affinities_values(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-affinities-values. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as values. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) - - _yang_name = 'path-affinities-values' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinities-values'] - - def _get_path_affinities_value(self): - """ - Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinities_value - - def _set_path_affinities_value(self, v, load=False): - """ - Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_value() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_value must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinities_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_value(self): - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinities_value = __builtin__.property(_get_path_affinities_value) - - - _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py deleted file mode 100644 index 7a8d69da6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_affinities_value(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-affinities-values/path-affinities-value. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) - - _yang_name = 'path-affinities-value' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinities-values', 'path-affinities-value'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) - - YANG Description: The affinity value. The default is empty. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: The affinity value. The default is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with admin-groups""", - 'defined-type': "ietf-te-topology:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - - usage = __builtin__.property(_get_usage) - value = __builtin__.property(_get_value) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py deleted file mode 100644 index ac5c598a4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinity_name -class path_affinity_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-affinity-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as names. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) - - _yang_name = 'path-affinity-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinity-names'] - - def _get_path_affinity_name(self): - """ - Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinity_name - - def _set_path_affinity_name(self, v, load=False): - """ - Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_name() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_name(self): - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinity_name = __builtin__.property(_get_path_affinity_name) - - - _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py deleted file mode 100644 index df70c3c79..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import affinity_name -class path_affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-affinity-names/path-affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) - - _yang_name = 'path-affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinity-names', 'path-affinity-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_affinity_name(self): - """ - Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) - - YANG Description: List of named affinities. - """ - return self.__affinity_name - - def _set_affinity_name(self, v, load=False): - """ - Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_affinity_name() directly. - - YANG Description: List of named affinities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_affinity_name(self): - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - usage = __builtin__.property(_get_usage) - affinity_name = __builtin__.property(_get_affinity_name) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py deleted file mode 100644 index 5b69454e7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-affinity-names/path-affinity-name/affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinities. - """ - __slots__ = ('_path_helper', '_extmethods', '__name',) - - _yang_name = 'affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) - - YANG Description: Identifies a named affinity entry. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Identifies a named affinity entry. - """ - 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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - name = __builtin__.property(_get_name) - - - _pyangbind_elements = OrderedDict([('name', name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py deleted file mode 100644 index d5df4f469..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_metric_bound -class path_metric_bounds(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-metric-bounds. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric bounds container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound',) - - _yang_name = 'path-metric-bounds' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-metric-bounds'] - - def _get_path_metric_bound(self): - """ - Getter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound (list) - - YANG Description: List of TE path metric bounds. - """ - return self.__path_metric_bound - - def _set_path_metric_bound(self, v, load=False): - """ - Setter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric_bound is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric_bound() directly. - - YANG Description: List of TE path metric bounds. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric_bound must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_metric_bound = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric_bound(self): - self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_metric_bound = __builtin__.property(_get_path_metric_bound) - - - _pyangbind_elements = OrderedDict([('path_metric_bound', path_metric_bound), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py deleted file mode 100644 index fd7e445c0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py +++ /dev/null @@ -1,165 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_metric_bound(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-metric-bounds/path-metric-bound. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of TE path metric bounds. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__upper_bound',) - - _yang_name = 'path-metric-bound' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-metric-bounds', 'path-metric-bound'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) - - YANG Description: Identifies an entry in the list of 'metric-type' items -bound for the TE path. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: Identifies an entry in the list of 'metric-type' items -bound for the TE path. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_upper_bound(self): - """ - Getter method for upper_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) - - YANG Description: Upper bound on the end-to-end TE path metric. A zero -indicates an unbounded upper limit for the specific -'metric-type'. - """ - return self.__upper_bound - - def _set_upper_bound(self, v, load=False): - """ - Setter method for upper_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_upper_bound is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_upper_bound() directly. - - YANG Description: Upper bound on the end-to-end TE path metric. A zero -indicates an unbounded upper limit for the specific -'metric-type'. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """upper_bound must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__upper_bound = t - if hasattr(self, '_set'): - self._set() - - def _unset_upper_bound(self): - self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - - metric_type = __builtin__.property(_get_metric_type) - upper_bound = __builtin__.property(_get_upper_bound) - - - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('upper_bound', upper_bound), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py deleted file mode 100644 index f089523be..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_list -class path_srlgs_lists(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-lists. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path SRLG properties container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) - - _yang_name = 'path-srlgs-lists' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-lists'] - - def _get_path_srlgs_list(self): - """ - Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list (list) - - YANG Description: List of SRLG values to be included or excluded. - """ - return self.__path_srlgs_list - - def _set_path_srlgs_list(self, v, load=False): - """ - Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_list() directly. - - YANG Description: List of SRLG values to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_list must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_list(self): - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_list = __builtin__.property(_get_path_srlgs_list) - - - _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py deleted file mode 100644 index b48cb25ff..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_list(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-lists/path-srlgs-list. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of SRLG values to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) - - _yang_name = 'path-srlgs-list' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-lists', 'path-srlgs-list'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_values(self): - """ - Getter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) - - YANG Description: List of SRLG values. - """ - return self.__values - - def _set_values(self, v, load=False): - """ - Setter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_values() directly. - - YANG Description: List of SRLG values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """values must be of a type compatible with srlg""", - 'defined-type': "ietf-te-topology:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", - }) - - self.__values = t - if hasattr(self, '_set'): - self._set() - - def _unset_values(self): - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - - usage = __builtin__.property(_get_usage) - values = __builtin__.property(_get_values) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py deleted file mode 100644 index d18d1658d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_name -class path_srlgs_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of named SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) - - _yang_name = 'path-srlgs-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-names'] - - def _get_path_srlgs_name(self): - """ - Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name (list) - - YANG Description: List of named SRLGs to be included or excluded. - """ - return self.__path_srlgs_name - - def _set_path_srlgs_name(self, v, load=False): - """ - Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_name() directly. - - YANG Description: List of named SRLGs to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_name(self): - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_name = __builtin__.property(_get_path_srlgs_name) - - - _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py deleted file mode 100644 index cee736f24..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-names/path-srlgs-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named SRLGs to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) - - _yang_name = 'path-srlgs-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-names', 'path-srlgs-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_names(self): - """ - Getter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/names (string) - - YANG Description: List of named SRLGs. - """ - return self.__names - - def _set_names(self, v, load=False): - """ - Setter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/names (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_names() directly. - - YANG Description: List of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """names must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__names = t - if hasattr(self, '_set'): - self._set() - - def _unset_names(self): - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - usage = __builtin__.property(_get_usage) - names = __builtin__.property(_get_names) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py deleted file mode 100644 index a079dcabf..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py deleted file mode 100644 index 6b5dd7c31..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) - - - def _get_odtu_flex_type(self): - """ - Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -set up along the underlay path of this OTN -connectivity matrix entry. - """ - return self.__odtu_flex_type - - def _set_odtu_flex_type(self, v, load=False): - """ - Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_odtu_flex_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odtu_flex_type() directly. - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -set up along the underlay path of this OTN -connectivity matrix entry. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", - 'defined-type': "l1-types:odtu-flex-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False)""", - }) - - self.__odtu_flex_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odtu_flex_type(self): - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False) - - odulist = __builtin__.property(_get_odulist) - odtu_flex_type = __builtin__.property(_get_odtu_flex_type) - - __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} - _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index afa750977..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - - odu_type = __builtin__.property(_get_odu_type) - number = __builtin__.property(_get_number) - ts_number = __builtin__.property(_get_ts_number) - - __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py deleted file mode 100644 index f87c34494..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py +++ /dev/null @@ -1,318 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_metric -from . import path_affinities_values -from . import path_affinity_names -from . import path_srlgs_lists -from . import path_srlgs_names -from . import path_route_objects -class path_properties(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The TE path properties. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_metric','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__path_route_objects',) - - _yang_name = 'path-properties' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties'] - - def _get_path_metric(self): - """ - Getter method for path_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric (list) - - YANG Description: TE path metric type. - """ - return self.__path_metric - - def _set_path_metric(self, v, load=False): - """ - Setter method for path_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric() directly. - - YANG Description: TE path metric type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric(self): - self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_path_affinities_values(self): - """ - Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values (container) - - YANG Description: Path affinities represented as values. - """ - return self.__path_affinities_values - - def _set_path_affinities_values(self, v, load=False): - """ - Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_values() directly. - - YANG Description: Path affinities represented as values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_values must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinities_values = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_values(self): - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_affinity_names(self): - """ - Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names (container) - - YANG Description: Path affinities represented as names. - """ - return self.__path_affinity_names - - def _set_path_affinity_names(self, v, load=False): - """ - Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_names() directly. - - YANG Description: Path affinities represented as names. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinity_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_names(self): - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_lists(self): - """ - Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists (container) - - YANG Description: Path SRLG properties container. - """ - return self.__path_srlgs_lists - - def _set_path_srlgs_lists(self, v, load=False): - """ - Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_lists is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_lists() directly. - - YANG Description: Path SRLG properties container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_lists must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_lists = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_lists(self): - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_names(self): - """ - Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names (container) - - YANG Description: Container for the list of named SRLGs. - """ - return self.__path_srlgs_names - - def _set_path_srlgs_names(self, v, load=False): - """ - Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_names() directly. - - YANG Description: Container for the list of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_names(self): - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_route_objects(self): - """ - Getter method for path_route_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects (container) - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - return self.__path_route_objects - - def _set_path_route_objects(self, v, load=False): - """ - Setter method for path_route_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_route_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_route_objects() directly. - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_route_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_route_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_route_objects(self): - self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - path_metric = __builtin__.property(_get_path_metric) - path_affinities_values = __builtin__.property(_get_path_affinities_values) - path_affinity_names = __builtin__.property(_get_path_affinity_names) - path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) - path_srlgs_names = __builtin__.property(_get_path_srlgs_names) - path_route_objects = __builtin__.property(_get_path_route_objects) - - - _pyangbind_elements = OrderedDict([('path_metric', path_metric), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('path_route_objects', path_route_objects), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py deleted file mode 100644 index 5e54de272..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinities_value -class path_affinities_values(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-affinities-values. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as values. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) - - _yang_name = 'path-affinities-values' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinities-values'] - - def _get_path_affinities_value(self): - """ - Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinities_value - - def _set_path_affinities_value(self, v, load=False): - """ - Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_value() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_value must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinities_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_value(self): - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinities_value = __builtin__.property(_get_path_affinities_value) - - - _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py deleted file mode 100644 index df6fd94eb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_affinities_value(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-affinities-values/path-affinities-value. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) - - _yang_name = 'path-affinities-value' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinities-values', 'path-affinities-value'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/usage (identityref) - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) - - YANG Description: The affinity value. The default is empty. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: The affinity value. The default is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with admin-groups""", - 'defined-type': "ietf-te-topology:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - - usage = __builtin__.property(_get_usage) - value = __builtin__.property(_get_value) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py deleted file mode 100644 index 97969b437..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinity_name -class path_affinity_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-affinity-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as names. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) - - _yang_name = 'path-affinity-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinity-names'] - - def _get_path_affinity_name(self): - """ - Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinity_name - - def _set_path_affinity_name(self, v, load=False): - """ - Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_name() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_name(self): - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinity_name = __builtin__.property(_get_path_affinity_name) - - - _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py deleted file mode 100644 index 47b1cb476..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import affinity_name -class path_affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-affinity-names/path-affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) - - _yang_name = 'path-affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinity-names', 'path-affinity-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/usage (identityref) - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_affinity_name(self): - """ - Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) - - YANG Description: List of named affinities. - """ - return self.__affinity_name - - def _set_affinity_name(self, v, load=False): - """ - Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_affinity_name() directly. - - YANG Description: List of named affinities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_affinity_name(self): - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - usage = __builtin__.property(_get_usage) - affinity_name = __builtin__.property(_get_affinity_name) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py deleted file mode 100644 index 043b7900e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-affinity-names/path-affinity-name/affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinities. - """ - __slots__ = ('_path_helper', '_extmethods', '__name',) - - _yang_name = 'affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) - - YANG Description: Identifies a named affinity entry. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Identifies a named affinity entry. - """ - 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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - name = __builtin__.property(_get_name) - - - _pyangbind_elements = OrderedDict([('name', name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py deleted file mode 100644 index 46350a791..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py +++ /dev/null @@ -1,159 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_metric(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-metric. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric type. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__accumulative_value',) - - _yang_name = 'path-metric' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-metric'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/metric_type (identityref) - - YANG Description: TE path metric type. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: TE path metric type. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_accumulative_value(self): - """ - Getter method for accumulative_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/accumulative_value (uint64) - - YANG Description: TE path metric accumulative value. - """ - return self.__accumulative_value - - def _set_accumulative_value(self, v, load=False): - """ - Setter method for accumulative_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/accumulative_value (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_accumulative_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_accumulative_value() directly. - - YANG Description: TE path metric accumulative value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """accumulative_value must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__accumulative_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_accumulative_value(self): - self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - - metric_type = __builtin__.property(_get_metric_type) - accumulative_value = __builtin__.property(_get_accumulative_value) - - - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('accumulative_value', accumulative_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py deleted file mode 100644 index cd515c92f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_route_object -class path_route_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_route_object',) - - _yang_name = 'path-route-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects'] - - def _get_path_route_object(self): - """ - Getter method for path_route_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object (list) - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - return self.__path_route_object - - def _set_path_route_object(self, v, load=False): - """ - Setter method for path_route_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_route_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_route_object() directly. - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_route_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_route_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_route_object(self): - self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_route_object = __builtin__.property(_get_path_route_object) - - - _pyangbind_elements = OrderedDict([('path_route_object', path_route_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py deleted file mode 100644 index 1161f751e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py +++ /dev/null @@ -1,327 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_route_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-route-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key -values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key -values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - index = __builtin__.property(_get_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py deleted file mode 100644 index b257ffed7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py deleted file mode 100644 index 1740e147e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py deleted file mode 100644 index f69cf8311..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index e8b6d2f8d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py deleted file mode 100644 index af1242f7d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py deleted file mode 100644 index 6d0602665..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index ce5442e68..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py deleted file mode 100644 index 9eeb9f3bc..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_list -class path_srlgs_lists(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-lists. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path SRLG properties container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) - - _yang_name = 'path-srlgs-lists' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-lists'] - - def _get_path_srlgs_list(self): - """ - Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list (list) - - YANG Description: List of SRLG values to be included or excluded. - """ - return self.__path_srlgs_list - - def _set_path_srlgs_list(self, v, load=False): - """ - Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_list() directly. - - YANG Description: List of SRLG values to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_list must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_list(self): - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_list = __builtin__.property(_get_path_srlgs_list) - - - _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py deleted file mode 100644 index 1055b900a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_list(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-lists/path-srlgs-list. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of SRLG values to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) - - _yang_name = 'path-srlgs-list' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-lists', 'path-srlgs-list'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_values(self): - """ - Getter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) - - YANG Description: List of SRLG values. - """ - return self.__values - - def _set_values(self, v, load=False): - """ - Setter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_values() directly. - - YANG Description: List of SRLG values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """values must be of a type compatible with srlg""", - 'defined-type': "ietf-te-topology:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", - }) - - self.__values = t - if hasattr(self, '_set'): - self._set() - - def _unset_values(self): - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - - usage = __builtin__.property(_get_usage) - values = __builtin__.property(_get_values) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py deleted file mode 100644 index 796ccb5f2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_name -class path_srlgs_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of named SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) - - _yang_name = 'path-srlgs-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-names'] - - def _get_path_srlgs_name(self): - """ - Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name (list) - - YANG Description: List of named SRLGs to be included or excluded. - """ - return self.__path_srlgs_name - - def _set_path_srlgs_name(self, v, load=False): - """ - Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_name() directly. - - YANG Description: List of named SRLGs to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_name(self): - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_name = __builtin__.property(_get_path_srlgs_name) - - - _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py deleted file mode 100644 index bdfa7bcab..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-names/path-srlgs-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named SRLGs to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) - - _yang_name = 'path-srlgs-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-names', 'path-srlgs-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_names(self): - """ - Getter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/names (string) - - YANG Description: List of named SRLGs. - """ - return self.__names - - def _set_names(self, v, load=False): - """ - Setter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/names (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_names() directly. - - YANG Description: List of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """names must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__names = t - if hasattr(self, '_set'): - self._set() - - def _unset_names(self): - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - usage = __builtin__.property(_get_usage) - names = __builtin__.property(_get_names) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py deleted file mode 100644 index 71191caa0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py +++ /dev/null @@ -1,155 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restrictions -class to(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Reference to a destination LTP. - """ - __slots__ = ('_path_helper', '_extmethods', '__tp_ref','__label_restrictions',) - - _yang_name = 'to' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to'] - - def _get_tp_ref(self): - """ - Getter method for tp_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/tp_ref (leafref) - - YANG Description: Relative reference to a termination point. - """ - return self.__tp_ref - - def _set_tp_ref(self, v, load=False): - """ - Setter method for tp_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/tp_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tp_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tp_ref() directly. - - YANG Description: Relative reference to a termination point. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tp_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__tp_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_tp_ref(self): - self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - - def _get_label_restrictions(self): - """ - Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions (container) - - YANG Description: The label restrictions container. - """ - return self.__label_restrictions - - def _set_label_restrictions(self, v, load=False): - """ - Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restrictions is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restrictions() directly. - - YANG Description: The label restrictions container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restrictions must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_restrictions = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restrictions(self): - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - tp_ref = __builtin__.property(_get_tp_ref) - label_restrictions = __builtin__.property(_get_label_restrictions) - - - _pyangbind_elements = OrderedDict([('tp_ref', tp_ref), ('label_restrictions', label_restrictions), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py deleted file mode 100644 index 3873a02ce..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restriction -class label_restrictions(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The label restrictions container. - """ - __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) - - _yang_name = 'label-restrictions' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions'] - - def _get_label_restriction(self): - """ - Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction (list) - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - return self.__label_restriction - - def _set_label_restriction(self, v, load=False): - """ - Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restriction() directly. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restriction must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__label_restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restriction(self): - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - label_restriction = __builtin__.property(_get_label_restriction) - - - _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py deleted file mode 100644 index dbf240ba8..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py +++ /dev/null @@ -1,450 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_start -from . import label_end -from . import label_step -from . import otn_label_range -from . import ethernet_label_range -class label_restriction(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) - - _yang_name = 'label-restriction' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction'] - - def _get_restriction(self): - """ - Getter method for restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/restriction (enumeration) - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - return self.__restriction - - def _set_restriction(self, v, load=False): - """ - Setter method for restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/restriction (enumeration) - If this variable is read-only (config: false) in the - source YANG file, then _set_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restriction() directly. - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restriction must be of a type compatible with enumeration""", - 'defined-type': "ietf-te-topology:enumeration", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False)""", - }) - - self.__restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_restriction(self): - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) - - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/index (uint32) - - YANG Description: The index of the label restriction list entry. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: The index of the label restriction list entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_label_start(self): - """ - Getter method for label_start, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start (container) - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - return self.__label_start - - def _set_label_start(self, v, load=False): - """ - Setter method for label_start, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_start is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_start() directly. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_start must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_start = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_start(self): - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_end(self): - """ - Getter method for label_end, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end (container) - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - return self.__label_end - - def _set_label_end(self, v, load=False): - """ - Setter method for label_end, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_end is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_end() directly. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_end must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_end = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_end(self): - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_step(self): - """ - Getter method for label_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step (container) - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - return self.__label_step - - def _set_label_step(self, v, load=False): - """ - Setter method for label_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_step() directly. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_step must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_step(self): - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_range_bitmap(self): - """ - Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - return self.__range_bitmap - - def _set_range_bitmap(self, v, load=False): - """ - Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_bitmap is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_bitmap() directly. - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", - 'defined-type': "yang:hex-string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False)""", - }) - - self.__range_bitmap = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_bitmap(self): - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) - - - def _get_otn_label_range(self): - """ - Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range (container) - - YANG Description: Label range information for OTN. - """ - return self.__otn_label_range - - def _set_otn_label_range(self, v, load=False): - """ - Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn_label_range() directly. - - YANG Description: Label range information for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn_label_range(self): - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_ethernet_label_range(self): - """ - Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range (container) - - YANG Description: Ethernet-specific label range related information. - """ - return self.__ethernet_label_range - - def _set_ethernet_label_range(self, v, load=False): - """ - Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_ethernet_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ethernet_label_range() directly. - - YANG Description: Ethernet-specific label range related information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ethernet_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False)""", - }) - - self.__ethernet_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_ethernet_label_range(self): - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) - - restriction = __builtin__.property(_get_restriction) - index = __builtin__.property(_get_index) - label_start = __builtin__.property(_get_label_start) - label_end = __builtin__.property(_get_label_end) - label_step = __builtin__.property(_get_label_step) - range_bitmap = __builtin__.property(_get_range_bitmap) - otn_label_range = __builtin__.property(_get_otn_label_range) - ethernet_label_range = __builtin__.property(_get_ethernet_label_range) - - - _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py deleted file mode 100644 index 3f672822b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ethernet_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/ethernet-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Ethernet-specific label range related information. - """ - __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) - - _yang_name = 'ethernet-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] - - def _get_tag_type(self): - """ - Getter method for tag_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - - YANG Description: VLAN tag type. - """ - return self.__tag_type - - def _set_tag_type(self, v, load=False): - """ - Setter method for tag_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_tag_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tag_type() directly. - - YANG Description: VLAN tag type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", - 'defined-type': "etht-types:eth-tag-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False)""", - }) - - self.__tag_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tag_type(self): - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - - YANG Description: priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) - - tag_type = __builtin__.property(_get_tag_type) - priority = __builtin__.property(_get_priority) - - - _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py deleted file mode 100644 index 332a60265..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_end(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-end. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-end' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-end'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py deleted file mode 100644 index 37028d9bf..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-end/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py deleted file mode 100644 index 162b89624..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - - tpn = __builtin__.property(_get_tpn) - ts = __builtin__.property(_get_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py deleted file mode 100644 index 334475e0d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_start(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-start. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-start' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-start'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py deleted file mode 100644 index 7c384d8f7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-start/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py deleted file mode 100644 index 612e7141b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - - tpn = __builtin__.property(_get_tpn) - ts = __builtin__.property(_get_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py deleted file mode 100644 index 12f872b1f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class label_step(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-step. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) - - _yang_name = 'label-step' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-step'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/generic (int32) - - YANG Description: Label range step. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/generic (int32) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Label range step. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with int32""", - 'defined-type': "int32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn (container) - - YANG Description: Label step for OTN - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label step for OTN - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_eth_step(self): - """ - Getter method for eth_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/eth_step (uint16) - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - return self.__eth_step - - def _set_eth_step(self, v, load=False): - """ - Setter method for eth_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/eth_step (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_step() directly. - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_step must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False)""", - }) - - self.__eth_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_step(self): - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - eth_step = __builtin__.property(_get_eth_step) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py deleted file mode 100644 index 4f53bda83..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-step/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label step for OTN - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - - tpn = __builtin__.property(_get_tpn) - ts = __builtin__.property(_get_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py deleted file mode 100644 index 84ed14bf9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py +++ /dev/null @@ -1,256 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/otn-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label range information for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) - - _yang_name = 'otn-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'otn-label-range'] - - def _get_range_type(self): - """ - Getter method for range_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - return self.__range_type - - def _set_range_type(self, v, load=False): - """ - Setter method for range_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_type() directly. - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_type must be of a type compatible with otn-label-range-type""", - 'defined-type': "ietf-otn-topology:otn-label-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False)""", - }) - - self.__range_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_type(self): - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_odu_type_list(self): - """ - Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - return self.__odu_type_list - - def _set_odu_type_list(self, v, load=False): - """ - Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type_list() directly. - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type_list must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__odu_type_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type_list(self): - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/priority (uint8) - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) - - range_type = __builtin__.property(_get_range_type) - tsg = __builtin__.property(_get_tsg) - odu_type_list = __builtin__.property(_get_odu_type_list) - priority = __builtin__.property(_get_priority) - - - _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py deleted file mode 100644 index 0660881e2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py +++ /dev/null @@ -1,326 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import primary_path -from . import backup_path -from . import tunnel_termination_points -from . import tunnels -class underlay(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Attributes of the TE link underlay. - """ - __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) - - _yang_name = 'underlay' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay'] - - def _get_enabled(self): - """ - Getter method for enabled, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/enabled (boolean) - - YANG Description: 'true' if the underlay is enabled. -'false' if the underlay is disabled. - """ - return self.__enabled - - def _set_enabled(self, v, load=False): - """ - Setter method for enabled, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/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: 'true' if the underlay is enabled. -'false' if the underlay is 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - - - def _get_primary_path(self): - """ - Getter method for primary_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path (container) - - YANG Description: The service path on the underlay topology that -supports this link. - """ - return self.__primary_path - - def _set_primary_path(self, v, load=False): - """ - Setter method for primary_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_primary_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_primary_path() directly. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """primary_path must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__primary_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_primary_path(self): - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_backup_path(self): - """ - Getter method for backup_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path (list) - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - return self.__backup_path - - def _set_backup_path(self, v, load=False): - """ - Setter method for backup_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_backup_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_backup_path() directly. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """backup_path must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__backup_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_backup_path(self): - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_protection_type(self): - """ - Getter method for protection_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/protection_type (identityref) - - YANG Description: Underlay protection type desired for this link. - """ - return self.__protection_type - - def _set_protection_type(self, v, load=False): - """ - Setter method for protection_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/protection_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_protection_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_protection_type() directly. - - YANG Description: Underlay protection type desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """protection_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__protection_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_protection_type(self): - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_tunnel_termination_points(self): - """ - Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points (container) - - YANG Description: Underlay TTPs desired for this link. - """ - return self.__tunnel_termination_points - - def _set_tunnel_termination_points(self, v, load=False): - """ - Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_termination_points is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_termination_points() directly. - - YANG Description: Underlay TTPs desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_termination_points must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__tunnel_termination_points = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_termination_points(self): - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_tunnels(self): - """ - Getter method for tunnels, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels (container) - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - return self.__tunnels - - def _set_tunnels(self, v, load=False): - """ - Setter method for tunnels, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnels is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnels() directly. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnels must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__tunnels = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnels(self): - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - enabled = __builtin__.property(_get_enabled) - primary_path = __builtin__.property(_get_primary_path) - backup_path = __builtin__.property(_get_backup_path) - protection_type = __builtin__.property(_get_protection_type) - tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points) - tunnels = __builtin__.property(_get_tunnels) - - - _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py deleted file mode 100644 index 5e6da0327..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py +++ /dev/null @@ -1,207 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class backup_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) - - _yang_name = 'backup-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/index (uint32) - - YANG Description: A sequence number to identify a backup path. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: A sequence number to identify a backup path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element (list) - - YANG Description: A list of path elements describing the backup service -path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the backup service -path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - index = __builtin__.property(_get_index) - network_ref = __builtin__.property(_get_network_ref) - path_element = __builtin__.property(_get_path_element) - - - _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py deleted file mode 100644 index 0e6bea889..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py +++ /dev/null @@ -1,321 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the backup service -path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - path_element_id = __builtin__.property(_get_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index 2245d0d0e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py deleted file mode 100644 index 9fc0b539a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index 6ed428029..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 242d6f3f2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index f6c47d464..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index ba3dfc1f6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index b5d313c9b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py deleted file mode 100644 index 9efabfdc9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class primary_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) - - _yang_name = 'primary-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element (list) - - YANG Description: A list of path elements describing the service path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the service path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - network_ref = __builtin__.property(_get_network_ref) - path_element = __builtin__.property(_get_path_element) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py deleted file mode 100644 index c680af6e0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py +++ /dev/null @@ -1,320 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the service path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - path_element_id = __builtin__.property(_get_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index 33f85e528..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py deleted file mode 100644 index 6cb0c9c11..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index 04bb5f8c6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index e0b0c85c5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index bc4a1ad28..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index 1f6120bd5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index 7f75c0107..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py deleted file mode 100644 index fe1f4b855..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel_termination_points(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/tunnel-termination-points. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TTPs desired for this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) - - _yang_name = 'tunnel-termination-points' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'tunnel-termination-points'] - - def _get_source(self): - """ - Getter method for source, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/source (binary) - - YANG Description: Source TTP identifier. - """ - return self.__source - - def _set_source(self, v, load=False): - """ - Setter method for source, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/source (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_source is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_source() directly. - - YANG Description: Source TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """source must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False)""", - }) - - self.__source = t - if hasattr(self, '_set'): - self._set() - - def _unset_source(self): - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) - - - def _get_destination(self): - """ - Getter method for destination, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/destination (binary) - - YANG Description: Destination TTP identifier. - """ - return self.__destination - - def _set_destination(self, v, load=False): - """ - Setter method for destination, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/destination (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_destination is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_destination() directly. - - YANG Description: Destination TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """destination must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False)""", - }) - - self.__destination = t - if hasattr(self, '_set'): - self._set() - - def _unset_destination(self): - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) - - source = __builtin__.property(_get_source) - destination = __builtin__.property(_get_destination) - - - _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py deleted file mode 100644 index 0493843c7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py +++ /dev/null @@ -1,167 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tunnel -class tunnels(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/tunnels. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) - - _yang_name = 'tunnels' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'tunnels'] - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - - - def _get_tunnel(self): - """ - Getter method for tunnel, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel (list) - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - return self.__tunnel - - def _set_tunnel(self, v, load=False): - """ - Setter method for tunnel, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel() directly. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__tunnel = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel(self): - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - sharing = __builtin__.property(_get_sharing) - tunnel = __builtin__.property(_get_tunnel) - - - _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py deleted file mode 100644 index 0bade4537..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py +++ /dev/null @@ -1,170 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/tunnels/tunnel. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) - - _yang_name = 'tunnel' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'tunnels', 'tunnel'] - - def _get_tunnel_name(self): - """ - Getter method for tunnel_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/tunnel_name (string) - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - return self.__tunnel_name - - def _set_tunnel_name(self, v, load=False): - """ - Setter method for tunnel_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/tunnel_name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_name() directly. - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - 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=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__tunnel_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_name(self): - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - - tunnel_name = __builtin__.property(_get_tunnel_name) - sharing = __builtin__.property(_get_sharing) - - - _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py deleted file mode 100644 index 6d7414731..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restriction -class label_restrictions(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The label restrictions container. - """ - __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) - - _yang_name = 'label-restrictions' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions'] - - def _get_label_restriction(self): - """ - Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction (list) - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - return self.__label_restriction - - def _set_label_restriction(self, v, load=False): - """ - Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restriction() directly. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restriction must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__label_restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restriction(self): - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - label_restriction = __builtin__.property(_get_label_restriction) - - - _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py deleted file mode 100644 index 39cb5bdab..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py +++ /dev/null @@ -1,450 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_start -from . import label_end -from . import label_step -from . import otn_label_range -from . import ethernet_label_range -class label_restriction(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) - - _yang_name = 'label-restriction' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction'] - - def _get_restriction(self): - """ - Getter method for restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/restriction (enumeration) - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - return self.__restriction - - def _set_restriction(self, v, load=False): - """ - Setter method for restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/restriction (enumeration) - If this variable is read-only (config: false) in the - source YANG file, then _set_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restriction() directly. - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restriction must be of a type compatible with enumeration""", - 'defined-type': "ietf-te-topology:enumeration", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False)""", - }) - - self.__restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_restriction(self): - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) - - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/index (uint32) - - YANG Description: The index of the label restriction list entry. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: The index of the label restriction list entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_label_start(self): - """ - Getter method for label_start, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start (container) - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - return self.__label_start - - def _set_label_start(self, v, load=False): - """ - Setter method for label_start, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_start is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_start() directly. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_start must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_start = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_start(self): - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_end(self): - """ - Getter method for label_end, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end (container) - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - return self.__label_end - - def _set_label_end(self, v, load=False): - """ - Setter method for label_end, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_end is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_end() directly. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_end must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_end = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_end(self): - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_step(self): - """ - Getter method for label_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step (container) - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - return self.__label_step - - def _set_label_step(self, v, load=False): - """ - Setter method for label_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_step() directly. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_step must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_step(self): - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_range_bitmap(self): - """ - Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - return self.__range_bitmap - - def _set_range_bitmap(self, v, load=False): - """ - Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_bitmap is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_bitmap() directly. - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", - 'defined-type': "yang:hex-string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False)""", - }) - - self.__range_bitmap = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_bitmap(self): - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) - - - def _get_otn_label_range(self): - """ - Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range (container) - - YANG Description: Label range information for OTN. - """ - return self.__otn_label_range - - def _set_otn_label_range(self, v, load=False): - """ - Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn_label_range() directly. - - YANG Description: Label range information for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn_label_range(self): - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_ethernet_label_range(self): - """ - Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range (container) - - YANG Description: Ethernet-specific label range related information. - """ - return self.__ethernet_label_range - - def _set_ethernet_label_range(self, v, load=False): - """ - Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_ethernet_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ethernet_label_range() directly. - - YANG Description: Ethernet-specific label range related information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ethernet_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False)""", - }) - - self.__ethernet_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_ethernet_label_range(self): - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) - - restriction = __builtin__.property(_get_restriction) - index = __builtin__.property(_get_index) - label_start = __builtin__.property(_get_label_start) - label_end = __builtin__.property(_get_label_end) - label_step = __builtin__.property(_get_label_step) - range_bitmap = __builtin__.property(_get_range_bitmap) - otn_label_range = __builtin__.property(_get_otn_label_range) - ethernet_label_range = __builtin__.property(_get_ethernet_label_range) - - - _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py deleted file mode 100644 index 5cfb573c3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ethernet_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/ethernet-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Ethernet-specific label range related information. - """ - __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) - - _yang_name = 'ethernet-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] - - def _get_tag_type(self): - """ - Getter method for tag_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - - YANG Description: VLAN tag type. - """ - return self.__tag_type - - def _set_tag_type(self, v, load=False): - """ - Setter method for tag_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_tag_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tag_type() directly. - - YANG Description: VLAN tag type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", - 'defined-type': "etht-types:eth-tag-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False)""", - }) - - self.__tag_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tag_type(self): - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - - YANG Description: priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) - - tag_type = __builtin__.property(_get_tag_type) - priority = __builtin__.property(_get_priority) - - - _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py deleted file mode 100644 index 8c503e2b2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_end(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-end. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-end' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-end'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py deleted file mode 100644 index de17adeb4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-end/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py deleted file mode 100644 index 459dceb1d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - - tpn = __builtin__.property(_get_tpn) - ts = __builtin__.property(_get_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py deleted file mode 100644 index 1a8e4c4dc..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_start(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-start. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-start' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-start'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py deleted file mode 100644 index 1f66e6dae..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-start/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py deleted file mode 100644 index ad22f6a15..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - - tpn = __builtin__.property(_get_tpn) - ts = __builtin__.property(_get_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py deleted file mode 100644 index 42085f541..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class label_step(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-step. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) - - _yang_name = 'label-step' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-step'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/generic (int32) - - YANG Description: Label range step. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/generic (int32) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Label range step. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with int32""", - 'defined-type': "int32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn (container) - - YANG Description: Label step for OTN - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label step for OTN - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_eth_step(self): - """ - Getter method for eth_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/eth_step (uint16) - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - return self.__eth_step - - def _set_eth_step(self, v, load=False): - """ - Setter method for eth_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/eth_step (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_step() directly. - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_step must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False)""", - }) - - self.__eth_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_step(self): - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - eth_step = __builtin__.property(_get_eth_step) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py deleted file mode 100644 index 138aacf1b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-step/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label step for OTN - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) - - tpn = __builtin__.property(_get_tpn) - ts = __builtin__.property(_get_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py deleted file mode 100644 index b951f71cb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py +++ /dev/null @@ -1,256 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/otn-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label range information for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) - - _yang_name = 'otn-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'otn-label-range'] - - def _get_range_type(self): - """ - Getter method for range_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - return self.__range_type - - def _set_range_type(self, v, load=False): - """ - Setter method for range_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_type() directly. - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_type must be of a type compatible with otn-label-range-type""", - 'defined-type': "ietf-otn-topology:otn-label-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False)""", - }) - - self.__range_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_type(self): - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_odu_type_list(self): - """ - Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - return self.__odu_type_list - - def _set_odu_type_list(self, v, load=False): - """ - Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type_list() directly. - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type_list must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__odu_type_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type_list(self): - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/priority (uint8) - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) - - range_type = __builtin__.property(_get_range_type) - tsg = __builtin__.property(_get_tsg) - odu_type_list = __builtin__.property(_get_odu_type_list) - priority = __builtin__.property(_get_priority) - - - _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py deleted file mode 100644 index a561f8138..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py +++ /dev/null @@ -1,199 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import optimization_metric -from . import tiebreakers -from . import objective_function -class optimizations(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - __slots__ = ('_path_helper', '_extmethods', '__optimization_metric','__tiebreakers','__objective_function',) - - _yang_name = 'optimizations' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations'] - - def _get_optimization_metric(self): - """ - Getter method for optimization_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric (list) - - YANG Description: TE path metric type. - """ - return self.__optimization_metric - - def _set_optimization_metric(self, v, load=False): - """ - Setter method for optimization_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_optimization_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_optimization_metric() directly. - - YANG Description: TE path metric type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """optimization_metric must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__optimization_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_optimization_metric(self): - self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_tiebreakers(self): - """ - Getter method for tiebreakers, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers (container) - - YANG Description: Container for the list of tiebreakers. - """ - return self.__tiebreakers - - def _set_tiebreakers(self, v, load=False): - """ - Setter method for tiebreakers, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreakers is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreakers() directly. - - YANG Description: Container for the list of tiebreakers. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreakers must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__tiebreakers = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreakers(self): - self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_objective_function(self): - """ - Getter method for objective_function, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function (container) - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - return self.__objective_function - - def _set_objective_function(self, v, load=False): - """ - Setter method for objective_function, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_objective_function is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_objective_function() directly. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """objective_function must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__objective_function = t - if hasattr(self, '_set'): - self._set() - - def _unset_objective_function(self): - self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - optimization_metric = __builtin__.property(_get_optimization_metric) - tiebreakers = __builtin__.property(_get_tiebreakers) - objective_function = __builtin__.property(_get_objective_function) - - __choices__ = {'algorithm': {'metric': ['optimization_metric', 'tiebreakers'], 'objective-function': ['objective_function']}} - _pyangbind_elements = OrderedDict([('optimization_metric', optimization_metric), ('tiebreakers', tiebreakers), ('objective_function', objective_function), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/__init__.py deleted file mode 100644 index a5742ea30..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class objective_function(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/objective-function. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - __slots__ = ('_path_helper', '_extmethods', '__objective_function_type',) - - _yang_name = 'objective-function' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'objective-function'] - - def _get_objective_function_type(self): - """ - Getter method for objective_function_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/objective_function_type (identityref) - - YANG Description: Objective function entry. - """ - return self.__objective_function_type - - def _set_objective_function_type(self, v, load=False): - """ - Setter method for objective_function_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/objective_function_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_objective_function_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_objective_function_type() directly. - - YANG Description: Objective function entry. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """objective_function_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__objective_function_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_objective_function_type(self): - self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - objective_function_type = __builtin__.property(_get_objective_function_type) - - __choices__ = {'algorithm': {'objective-function': ['objective_function_type']}} - _pyangbind_elements = OrderedDict([('objective_function_type', objective_function_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/__init__.py deleted file mode 100644 index de3425526..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/__init__.py +++ /dev/null @@ -1,241 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import explicit_route_exclude_objects -from . import explicit_route_include_objects -class optimization_metric(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric type. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__weight','__explicit_route_exclude_objects','__explicit_route_include_objects',) - - _yang_name = 'optimization-metric' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/metric_type (identityref) - - YANG Description: Identifies the 'metric-type' that the path computation -process uses for optimization. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: Identifies the 'metric-type' that the path computation -process uses for optimization. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_weight(self): - """ - Getter method for weight, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/weight (uint8) - - YANG Description: TE path metric normalization weight. - """ - return self.__weight - - def _set_weight(self, v, load=False): - """ - Setter method for weight, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/weight (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_weight is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_weight() directly. - - YANG Description: TE path metric normalization weight. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """weight must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", - }) - - self.__weight = t - if hasattr(self, '_set'): - self._set() - - def _unset_weight(self): - self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - - - def _get_explicit_route_exclude_objects(self): - """ - Getter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects (container) - - YANG Description: Container for the 'exclude route' object list. - """ - return self.__explicit_route_exclude_objects - - def _set_explicit_route_exclude_objects(self, v, load=False): - """ - Setter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_explicit_route_exclude_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_explicit_route_exclude_objects() directly. - - YANG Description: Container for the 'exclude route' object list. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """explicit_route_exclude_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__explicit_route_exclude_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_explicit_route_exclude_objects(self): - self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_explicit_route_include_objects(self): - """ - Getter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects (container) - - YANG Description: Container for the 'include route' object list. - """ - return self.__explicit_route_include_objects - - def _set_explicit_route_include_objects(self, v, load=False): - """ - Setter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_explicit_route_include_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_explicit_route_include_objects() directly. - - YANG Description: Container for the 'include route' object list. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """explicit_route_include_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__explicit_route_include_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_explicit_route_include_objects(self): - self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - metric_type = __builtin__.property(_get_metric_type) - weight = __builtin__.property(_get_weight) - explicit_route_exclude_objects = __builtin__.property(_get_explicit_route_exclude_objects) - explicit_route_include_objects = __builtin__.property(_get_explicit_route_include_objects) - - __choices__ = {'algorithm': {'metric': ['metric_type', 'weight', 'explicit_route_exclude_objects', 'explicit_route_include_objects']}} - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('weight', weight), ('explicit_route_exclude_objects', explicit_route_exclude_objects), ('explicit_route_include_objects', explicit_route_include_objects), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py deleted file mode 100644 index 6df6741a9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import route_object_exclude_object -class explicit_route_exclude_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the 'exclude route' object list. - """ - __slots__ = ('_path_helper', '_extmethods', '__route_object_exclude_object',) - - _yang_name = 'explicit-route-exclude-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects'] - - def _get_route_object_exclude_object(self): - """ - Getter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - return self.__route_object_exclude_object - - def _set_route_object_exclude_object(self, v, load=False): - """ - Setter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_route_object_exclude_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_route_object_exclude_object() directly. - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """route_object_exclude_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__route_object_exclude_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_route_object_exclude_object(self): - self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - route_object_exclude_object = __builtin__.property(_get_route_object_exclude_object) - - __choices__ = {'algorithm': {'metric': ['route_object_exclude_object']}} - _pyangbind_elements = OrderedDict([('route_object_exclude_object', route_object_exclude_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py deleted file mode 100644 index 66415fe3b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py +++ /dev/null @@ -1,365 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -from . import srlg -class route_object_exclude_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop','__srlg',) - - _yang_name = 'route-object-exclude-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_srlg(self): - """ - Getter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) - - YANG Description: SRLG container. - """ - return self.__srlg - - def _set_srlg(self, v, load=False): - """ - Setter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_srlg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_srlg() directly. - - YANG Description: SRLG container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """srlg must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__srlg = t - if hasattr(self, '_set'): - self._set() - - def _unset_srlg(self): - self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - index = __builtin__.property(_get_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - srlg = __builtin__.property(_get_srlg) - - __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop'], 'srlg': ['srlg']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ('srlg', srlg), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py deleted file mode 100644 index 267567f74..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py deleted file mode 100644 index dfb42f946..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py deleted file mode 100644 index 22dc3125e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 687069414..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py deleted file mode 100644 index 5981ace64..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py deleted file mode 100644 index e42736cbe..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py deleted file mode 100644 index fcd5a3c7e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py +++ /dev/null @@ -1,115 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class srlg(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/srlg. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: SRLG container. - """ - __slots__ = ('_path_helper', '_extmethods', '__srlg',) - - _yang_name = 'srlg' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'srlg'] - - def _get_srlg(self): - """ - Getter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) - - YANG Description: SRLG value. - """ - return self.__srlg - - def _set_srlg(self, v, load=False): - """ - Setter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_srlg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_srlg() directly. - - YANG Description: SRLG value. - """ - 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="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """srlg 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="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__srlg = t - if hasattr(self, '_set'): - self._set() - - def _unset_srlg(self): - self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - srlg = __builtin__.property(_get_srlg) - - __choices__ = {'type': {'srlg': ['srlg']}} - _pyangbind_elements = OrderedDict([('srlg', srlg), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index 487e25e73..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py deleted file mode 100644 index 06b2702da..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import route_object_include_object -class explicit_route_include_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the 'include route' object list. - """ - __slots__ = ('_path_helper', '_extmethods', '__route_object_include_object',) - - _yang_name = 'explicit-route-include-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects'] - - def _get_route_object_include_object(self): - """ - Getter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - return self.__route_object_include_object - - def _set_route_object_include_object(self, v, load=False): - """ - Setter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_route_object_include_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_route_object_include_object() directly. - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """route_object_include_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__route_object_include_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_route_object_include_object(self): - self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - route_object_include_object = __builtin__.property(_get_route_object_include_object) - - __choices__ = {'algorithm': {'metric': ['route_object_include_object']}} - _pyangbind_elements = OrderedDict([('route_object_include_object', route_object_include_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py deleted file mode 100644 index 0b7b9e7e8..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py +++ /dev/null @@ -1,325 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class route_object_include_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'route-object-include-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - index = __builtin__.property(_get_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - - __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py deleted file mode 100644 index a30ba2c88..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py deleted file mode 100644 index 5adb8788e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py deleted file mode 100644 index 9494b4fda..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 030f51b1f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py deleted file mode 100644 index 50a4caad8..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py deleted file mode 100644 index 6952ba89b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index a4ec3b3a9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/__init__.py deleted file mode 100644 index 3357913dd..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tiebreaker -class tiebreakers(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/tiebreakers. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of tiebreakers. - """ - __slots__ = ('_path_helper', '_extmethods', '__tiebreaker',) - - _yang_name = 'tiebreakers' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'tiebreakers'] - - def _get_tiebreaker(self): - """ - Getter method for tiebreaker, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker (list) - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - return self.__tiebreaker - - def _set_tiebreaker(self, v, load=False): - """ - Setter method for tiebreaker, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreaker is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreaker() directly. - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreaker must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__tiebreaker = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreaker(self): - self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - tiebreaker = __builtin__.property(_get_tiebreaker) - - __choices__ = {'algorithm': {'metric': ['tiebreaker']}} - _pyangbind_elements = OrderedDict([('tiebreaker', tiebreaker), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py deleted file mode 100644 index 4478acced..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py +++ /dev/null @@ -1,122 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tiebreaker(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/tiebreakers/tiebreaker. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - __slots__ = ('_path_helper', '_extmethods', '__tiebreaker_type',) - - _yang_name = 'tiebreaker' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'tiebreakers', 'tiebreaker'] - - def _get_tiebreaker_type(self): - """ - Getter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) - - YANG Description: Identifies an entry in the list of tiebreakers. - """ - return self.__tiebreaker_type - - def _set_tiebreaker_type(self, v, load=False): - """ - Setter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreaker_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreaker_type() directly. - - YANG Description: Identifies an entry in the list of tiebreakers. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreaker_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tiebreaker_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreaker_type(self): - self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - tiebreaker_type = __builtin__.property(_get_tiebreaker_type) - - __choices__ = {'algorithm': {'metric': ['tiebreaker_type']}} - _pyangbind_elements = OrderedDict([('tiebreaker_type', tiebreaker_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py deleted file mode 100644 index 74807897d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py +++ /dev/null @@ -1,523 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -from . import path_metric_bounds -from . import path_affinities_values -from . import path_affinity_names -from . import path_srlgs_lists -from . import path_srlgs_names -class path_constraints(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE named path constraints container. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth','__link_protection','__setup_priority','__hold_priority','__signaling_type','__path_metric_bounds','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__disjointness',) - - _yang_name = 'path-constraints' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints'] - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_link_protection(self): - """ - Getter method for link_protection, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/link_protection (identityref) - - YANG Description: Link protection type required for the links included -in the computed path. - """ - return self.__link_protection - - def _set_link_protection(self, v, load=False): - """ - Setter method for link_protection, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/link_protection (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_protection is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_protection() directly. - - YANG Description: Link protection type required for the links included -in the computed path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_protection must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__link_protection = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_protection(self): - self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_setup_priority(self): - """ - Getter method for setup_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/setup_priority (uint8) - - YANG Description: TE LSP requested setup priority. - """ - return self.__setup_priority - - def _set_setup_priority(self, v, load=False): - """ - Setter method for setup_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/setup_priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_setup_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_setup_priority() directly. - - YANG Description: TE LSP requested setup priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """setup_priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", - }) - - self.__setup_priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_setup_priority(self): - self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - - - def _get_hold_priority(self): - """ - Getter method for hold_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/hold_priority (uint8) - - YANG Description: TE LSP requested hold priority. - """ - return self.__hold_priority - - def _set_hold_priority(self, v, load=False): - """ - Setter method for hold_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/hold_priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_hold_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hold_priority() directly. - - YANG Description: TE LSP requested hold priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hold_priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", - }) - - self.__hold_priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_hold_priority(self): - self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) - - - def _get_signaling_type(self): - """ - Getter method for signaling_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/signaling_type (identityref) - - YANG Description: TE tunnel path signaling type. - """ - return self.__signaling_type - - def _set_signaling_type(self, v, load=False): - """ - Setter method for signaling_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/signaling_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_signaling_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_signaling_type() directly. - - YANG Description: TE tunnel path signaling type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """signaling_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__signaling_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_signaling_type(self): - self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_path_metric_bounds(self): - """ - Getter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds (container) - - YANG Description: TE path metric bounds container. - """ - return self.__path_metric_bounds - - def _set_path_metric_bounds(self, v, load=False): - """ - Setter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric_bounds is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric_bounds() directly. - - YANG Description: TE path metric bounds container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric_bounds must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_metric_bounds = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric_bounds(self): - self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_affinities_values(self): - """ - Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values (container) - - YANG Description: Path affinities represented as values. - """ - return self.__path_affinities_values - - def _set_path_affinities_values(self, v, load=False): - """ - Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_values() directly. - - YANG Description: Path affinities represented as values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_values must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinities_values = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_values(self): - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_affinity_names(self): - """ - Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names (container) - - YANG Description: Path affinities represented as names. - """ - return self.__path_affinity_names - - def _set_path_affinity_names(self, v, load=False): - """ - Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_names() directly. - - YANG Description: Path affinities represented as names. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinity_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_names(self): - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_lists(self): - """ - Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists (container) - - YANG Description: Path SRLG properties container. - """ - return self.__path_srlgs_lists - - def _set_path_srlgs_lists(self, v, load=False): - """ - Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_lists is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_lists() directly. - - YANG Description: Path SRLG properties container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_lists must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_lists = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_lists(self): - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_names(self): - """ - Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names (container) - - YANG Description: Container for the list of named SRLGs. - """ - return self.__path_srlgs_names - - def _set_path_srlgs_names(self, v, load=False): - """ - Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_names() directly. - - YANG Description: Container for the list of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_names(self): - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_disjointness(self): - """ - Getter method for disjointness, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/disjointness (te-path-disjointness) - - YANG Description: The type of resource disjointness. -When configured for a primary path, the disjointness level -applies to all secondary LSPs. When configured for a -secondary path, the disjointness level overrides the level -configured for the primary path. - """ - return self.__disjointness - - def _set_disjointness(self, v, load=False): - """ - Setter method for disjointness, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/disjointness (te-path-disjointness) - If this variable is read-only (config: false) in the - source YANG file, then _set_disjointness is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_disjointness() directly. - - YANG Description: The type of resource disjointness. -When configured for a primary path, the disjointness level -applies to all secondary LSPs. When configured for a -secondary path, the disjointness level overrides the level -configured for the primary path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """disjointness must be of a type compatible with te-path-disjointness""", - 'defined-type': "ietf-te-topology:te-path-disjointness", - 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False)""", - }) - - self.__disjointness = t - if hasattr(self, '_set'): - self._set() - - def _unset_disjointness(self): - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False) - - te_bandwidth = __builtin__.property(_get_te_bandwidth) - link_protection = __builtin__.property(_get_link_protection) - setup_priority = __builtin__.property(_get_setup_priority) - hold_priority = __builtin__.property(_get_hold_priority) - signaling_type = __builtin__.property(_get_signaling_type) - path_metric_bounds = __builtin__.property(_get_path_metric_bounds) - path_affinities_values = __builtin__.property(_get_path_affinities_values) - path_affinity_names = __builtin__.property(_get_path_affinity_names) - path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) - path_srlgs_names = __builtin__.property(_get_path_srlgs_names) - disjointness = __builtin__.property(_get_disjointness) - - - _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ('link_protection', link_protection), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('signaling_type', signaling_type), ('path_metric_bounds', path_metric_bounds), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('disjointness', disjointness), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py deleted file mode 100644 index 4f42a2ac9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinities_value -class path_affinities_values(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-affinities-values. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as values. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) - - _yang_name = 'path-affinities-values' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-affinities-values'] - - def _get_path_affinities_value(self): - """ - Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinities_value - - def _set_path_affinities_value(self, v, load=False): - """ - Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_value() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_value must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinities_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_value(self): - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinities_value = __builtin__.property(_get_path_affinities_value) - - - _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py deleted file mode 100644 index cd1a2c6ed..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_affinities_value(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-affinities-values/path-affinities-value. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) - - _yang_name = 'path-affinities-value' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-affinities-values', 'path-affinities-value'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) - - YANG Description: The affinity value. The default is empty. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: The affinity value. The default is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with admin-groups""", - 'defined-type': "ietf-te-topology:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - - usage = __builtin__.property(_get_usage) - value = __builtin__.property(_get_value) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py deleted file mode 100644 index a7f5be85b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinity_name -class path_affinity_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-affinity-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as names. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) - - _yang_name = 'path-affinity-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-affinity-names'] - - def _get_path_affinity_name(self): - """ - Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinity_name - - def _set_path_affinity_name(self, v, load=False): - """ - Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_name() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_name(self): - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinity_name = __builtin__.property(_get_path_affinity_name) - - - _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py deleted file mode 100644 index 67a1ea760..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import affinity_name -class path_affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-affinity-names/path-affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) - - _yang_name = 'path-affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-affinity-names', 'path-affinity-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_affinity_name(self): - """ - Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) - - YANG Description: List of named affinities. - """ - return self.__affinity_name - - def _set_affinity_name(self, v, load=False): - """ - Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_affinity_name() directly. - - YANG Description: List of named affinities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_affinity_name(self): - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - usage = __builtin__.property(_get_usage) - affinity_name = __builtin__.property(_get_affinity_name) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py deleted file mode 100644 index e97d6d57e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-affinity-names/path-affinity-name/affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinities. - """ - __slots__ = ('_path_helper', '_extmethods', '__name',) - - _yang_name = 'affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) - - YANG Description: Identifies a named affinity entry. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Identifies a named affinity entry. - """ - 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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - name = __builtin__.property(_get_name) - - - _pyangbind_elements = OrderedDict([('name', name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py deleted file mode 100644 index 92e0cb519..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_metric_bound -class path_metric_bounds(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-metric-bounds. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric bounds container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound',) - - _yang_name = 'path-metric-bounds' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-metric-bounds'] - - def _get_path_metric_bound(self): - """ - Getter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound (list) - - YANG Description: List of TE path metric bounds. - """ - return self.__path_metric_bound - - def _set_path_metric_bound(self, v, load=False): - """ - Setter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric_bound is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric_bound() directly. - - YANG Description: List of TE path metric bounds. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric_bound must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_metric_bound = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric_bound(self): - self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_metric_bound = __builtin__.property(_get_path_metric_bound) - - - _pyangbind_elements = OrderedDict([('path_metric_bound', path_metric_bound), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py deleted file mode 100644 index 74b7fca4e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py +++ /dev/null @@ -1,165 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_metric_bound(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-metric-bounds/path-metric-bound. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of TE path metric bounds. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__upper_bound',) - - _yang_name = 'path-metric-bound' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-metric-bounds', 'path-metric-bound'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) - - YANG Description: Identifies an entry in the list of 'metric-type' items -bound for the TE path. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: Identifies an entry in the list of 'metric-type' items -bound for the TE path. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_upper_bound(self): - """ - Getter method for upper_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) - - YANG Description: Upper bound on the end-to-end TE path metric. A zero -indicates an unbounded upper limit for the specific -'metric-type'. - """ - return self.__upper_bound - - def _set_upper_bound(self, v, load=False): - """ - Setter method for upper_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_upper_bound is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_upper_bound() directly. - - YANG Description: Upper bound on the end-to-end TE path metric. A zero -indicates an unbounded upper limit for the specific -'metric-type'. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """upper_bound must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__upper_bound = t - if hasattr(self, '_set'): - self._set() - - def _unset_upper_bound(self): - self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - - metric_type = __builtin__.property(_get_metric_type) - upper_bound = __builtin__.property(_get_upper_bound) - - - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('upper_bound', upper_bound), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py deleted file mode 100644 index 8c1eb4e15..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_list -class path_srlgs_lists(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-srlgs-lists. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path SRLG properties container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) - - _yang_name = 'path-srlgs-lists' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-srlgs-lists'] - - def _get_path_srlgs_list(self): - """ - Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list (list) - - YANG Description: List of SRLG values to be included or excluded. - """ - return self.__path_srlgs_list - - def _set_path_srlgs_list(self, v, load=False): - """ - Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_list() directly. - - YANG Description: List of SRLG values to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_list must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_list(self): - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_list = __builtin__.property(_get_path_srlgs_list) - - - _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py deleted file mode 100644 index 7ee7c8def..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_list(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-srlgs-lists/path-srlgs-list. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of SRLG values to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) - - _yang_name = 'path-srlgs-list' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-srlgs-lists', 'path-srlgs-list'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_values(self): - """ - Getter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) - - YANG Description: List of SRLG values. - """ - return self.__values - - def _set_values(self, v, load=False): - """ - Setter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_values() directly. - - YANG Description: List of SRLG values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """values must be of a type compatible with srlg""", - 'defined-type': "ietf-te-topology:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", - }) - - self.__values = t - if hasattr(self, '_set'): - self._set() - - def _unset_values(self): - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - - usage = __builtin__.property(_get_usage) - values = __builtin__.property(_get_values) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py deleted file mode 100644 index 20ff89122..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_name -class path_srlgs_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-srlgs-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of named SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) - - _yang_name = 'path-srlgs-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-srlgs-names'] - - def _get_path_srlgs_name(self): - """ - Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name (list) - - YANG Description: List of named SRLGs to be included or excluded. - """ - return self.__path_srlgs_name - - def _set_path_srlgs_name(self, v, load=False): - """ - Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_name() directly. - - YANG Description: List of named SRLGs to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_name(self): - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_name = __builtin__.property(_get_path_srlgs_name) - - - _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py deleted file mode 100644 index e04c9a278..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-srlgs-names/path-srlgs-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named SRLGs to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) - - _yang_name = 'path-srlgs-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-srlgs-names', 'path-srlgs-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_names(self): - """ - Getter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/names (string) - - YANG Description: List of named SRLGs. - """ - return self.__names - - def _set_names(self, v, load=False): - """ - Setter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/names (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_names() directly. - - YANG Description: List of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """names must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__names = t - if hasattr(self, '_set'): - self._set() - - def _unset_names(self): - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - usage = __builtin__.property(_get_usage) - names = __builtin__.property(_get_names) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py deleted file mode 100644 index 044405806..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py deleted file mode 100644 index cf1f3bd4c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) - - - def _get_odtu_flex_type(self): - """ - Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -set up along the underlay paths of these OTN -connectivity matrices. - """ - return self.__odtu_flex_type - - def _set_odtu_flex_type(self, v, load=False): - """ - Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_odtu_flex_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odtu_flex_type() directly. - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -set up along the underlay paths of these OTN -connectivity matrices. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", - 'defined-type': "l1-types:odtu-flex-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False)""", - }) - - self.__odtu_flex_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odtu_flex_type(self): - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False) - - odulist = __builtin__.property(_get_odulist) - odtu_flex_type = __builtin__.property(_get_odtu_flex_type) - - __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} - _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index 4e9960a67..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) - - odu_type = __builtin__.property(_get_odu_type) - number = __builtin__.property(_get_number) - ts_number = __builtin__.property(_get_ts_number) - - __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py deleted file mode 100644 index dfb5797aa..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py +++ /dev/null @@ -1,318 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_metric -from . import path_affinities_values -from . import path_affinity_names -from . import path_srlgs_lists -from . import path_srlgs_names -from . import path_route_objects -class path_properties(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The TE path properties. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_metric','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__path_route_objects',) - - _yang_name = 'path-properties' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties'] - - def _get_path_metric(self): - """ - Getter method for path_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric (list) - - YANG Description: TE path metric type. - """ - return self.__path_metric - - def _set_path_metric(self, v, load=False): - """ - Setter method for path_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric() directly. - - YANG Description: TE path metric type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric(self): - self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_path_affinities_values(self): - """ - Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values (container) - - YANG Description: Path affinities represented as values. - """ - return self.__path_affinities_values - - def _set_path_affinities_values(self, v, load=False): - """ - Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_values() directly. - - YANG Description: Path affinities represented as values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_values must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinities_values = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_values(self): - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_affinity_names(self): - """ - Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names (container) - - YANG Description: Path affinities represented as names. - """ - return self.__path_affinity_names - - def _set_path_affinity_names(self, v, load=False): - """ - Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_names() directly. - - YANG Description: Path affinities represented as names. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinity_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_names(self): - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_lists(self): - """ - Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists (container) - - YANG Description: Path SRLG properties container. - """ - return self.__path_srlgs_lists - - def _set_path_srlgs_lists(self, v, load=False): - """ - Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_lists is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_lists() directly. - - YANG Description: Path SRLG properties container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_lists must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_lists = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_lists(self): - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_names(self): - """ - Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names (container) - - YANG Description: Container for the list of named SRLGs. - """ - return self.__path_srlgs_names - - def _set_path_srlgs_names(self, v, load=False): - """ - Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_names() directly. - - YANG Description: Container for the list of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_names(self): - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_route_objects(self): - """ - Getter method for path_route_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects (container) - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - return self.__path_route_objects - - def _set_path_route_objects(self, v, load=False): - """ - Setter method for path_route_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_route_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_route_objects() directly. - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_route_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_route_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_route_objects(self): - self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - path_metric = __builtin__.property(_get_path_metric) - path_affinities_values = __builtin__.property(_get_path_affinities_values) - path_affinity_names = __builtin__.property(_get_path_affinity_names) - path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) - path_srlgs_names = __builtin__.property(_get_path_srlgs_names) - path_route_objects = __builtin__.property(_get_path_route_objects) - - - _pyangbind_elements = OrderedDict([('path_metric', path_metric), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('path_route_objects', path_route_objects), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py deleted file mode 100644 index 88aefb9b6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinities_value -class path_affinities_values(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-affinities-values. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as values. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) - - _yang_name = 'path-affinities-values' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-affinities-values'] - - def _get_path_affinities_value(self): - """ - Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinities_value - - def _set_path_affinities_value(self, v, load=False): - """ - Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_value() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_value must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinities_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_value(self): - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinities_value = __builtin__.property(_get_path_affinities_value) - - - _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py deleted file mode 100644 index 92f7c3235..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_affinities_value(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-affinities-values/path-affinities-value. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) - - _yang_name = 'path-affinities-value' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-affinities-values', 'path-affinities-value'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/usage (identityref) - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) - - YANG Description: The affinity value. The default is empty. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: The affinity value. The default is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with admin-groups""", - 'defined-type': "ietf-te-topology:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - - usage = __builtin__.property(_get_usage) - value = __builtin__.property(_get_value) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py deleted file mode 100644 index 9b9de5d16..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinity_name -class path_affinity_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-affinity-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as names. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) - - _yang_name = 'path-affinity-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-affinity-names'] - - def _get_path_affinity_name(self): - """ - Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinity_name - - def _set_path_affinity_name(self, v, load=False): - """ - Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_name() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_name(self): - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinity_name = __builtin__.property(_get_path_affinity_name) - - - _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py deleted file mode 100644 index ae1ed41e1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import affinity_name -class path_affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-affinity-names/path-affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) - - _yang_name = 'path-affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-affinity-names', 'path-affinity-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/usage (identityref) - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_affinity_name(self): - """ - Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) - - YANG Description: List of named affinities. - """ - return self.__affinity_name - - def _set_affinity_name(self, v, load=False): - """ - Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_affinity_name() directly. - - YANG Description: List of named affinities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_affinity_name(self): - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - usage = __builtin__.property(_get_usage) - affinity_name = __builtin__.property(_get_affinity_name) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py deleted file mode 100644 index 73aa7bee9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-affinity-names/path-affinity-name/affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinities. - """ - __slots__ = ('_path_helper', '_extmethods', '__name',) - - _yang_name = 'affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) - - YANG Description: Identifies a named affinity entry. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Identifies a named affinity entry. - """ - 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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - name = __builtin__.property(_get_name) - - - _pyangbind_elements = OrderedDict([('name', name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py deleted file mode 100644 index 71b3184bd..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py +++ /dev/null @@ -1,159 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_metric(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-metric. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric type. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__accumulative_value',) - - _yang_name = 'path-metric' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-metric'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/metric_type (identityref) - - YANG Description: TE path metric type. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: TE path metric type. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_accumulative_value(self): - """ - Getter method for accumulative_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/accumulative_value (uint64) - - YANG Description: TE path metric accumulative value. - """ - return self.__accumulative_value - - def _set_accumulative_value(self, v, load=False): - """ - Setter method for accumulative_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/accumulative_value (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_accumulative_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_accumulative_value() directly. - - YANG Description: TE path metric accumulative value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """accumulative_value must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__accumulative_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_accumulative_value(self): - self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - - metric_type = __builtin__.property(_get_metric_type) - accumulative_value = __builtin__.property(_get_accumulative_value) - - - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('accumulative_value', accumulative_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py deleted file mode 100644 index b21cd85db..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_route_object -class path_route_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_route_object',) - - _yang_name = 'path-route-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects'] - - def _get_path_route_object(self): - """ - Getter method for path_route_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object (list) - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - return self.__path_route_object - - def _set_path_route_object(self, v, load=False): - """ - Setter method for path_route_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_route_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_route_object() directly. - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_route_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_route_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_route_object(self): - self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_route_object = __builtin__.property(_get_path_route_object) - - - _pyangbind_elements = OrderedDict([('path_route_object', path_route_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py deleted file mode 100644 index c2331faf9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py +++ /dev/null @@ -1,327 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_route_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-route-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key -values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key -values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - index = __builtin__.property(_get_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py deleted file mode 100644 index 86c07902e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py deleted file mode 100644 index 07d9666ae..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py deleted file mode 100644 index 1204a2ff4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 874d8ed5f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py deleted file mode 100644 index e41be3b4c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py deleted file mode 100644 index eb07641c0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index e8eab3fc1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py deleted file mode 100644 index a1b457c6c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_list -class path_srlgs_lists(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-srlgs-lists. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path SRLG properties container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) - - _yang_name = 'path-srlgs-lists' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-srlgs-lists'] - - def _get_path_srlgs_list(self): - """ - Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list (list) - - YANG Description: List of SRLG values to be included or excluded. - """ - return self.__path_srlgs_list - - def _set_path_srlgs_list(self, v, load=False): - """ - Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_list() directly. - - YANG Description: List of SRLG values to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_list must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_list(self): - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_list = __builtin__.property(_get_path_srlgs_list) - - - _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py deleted file mode 100644 index 977077b1f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_list(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-srlgs-lists/path-srlgs-list. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of SRLG values to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) - - _yang_name = 'path-srlgs-list' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-srlgs-lists', 'path-srlgs-list'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_values(self): - """ - Getter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) - - YANG Description: List of SRLG values. - """ - return self.__values - - def _set_values(self, v, load=False): - """ - Setter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_values() directly. - - YANG Description: List of SRLG values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """values must be of a type compatible with srlg""", - 'defined-type': "ietf-te-topology:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", - }) - - self.__values = t - if hasattr(self, '_set'): - self._set() - - def _unset_values(self): - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - - usage = __builtin__.property(_get_usage) - values = __builtin__.property(_get_values) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py deleted file mode 100644 index 219ef7d27..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_name -class path_srlgs_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-srlgs-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of named SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) - - _yang_name = 'path-srlgs-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-srlgs-names'] - - def _get_path_srlgs_name(self): - """ - Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name (list) - - YANG Description: List of named SRLGs to be included or excluded. - """ - return self.__path_srlgs_name - - def _set_path_srlgs_name(self, v, load=False): - """ - Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_name() directly. - - YANG Description: List of named SRLGs to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_name(self): - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_name = __builtin__.property(_get_path_srlgs_name) - - - _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py deleted file mode 100644 index 3f83850b9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-srlgs-names/path-srlgs-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named SRLGs to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) - - _yang_name = 'path-srlgs-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-srlgs-names', 'path-srlgs-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_names(self): - """ - Getter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/names (string) - - YANG Description: List of named SRLGs. - """ - return self.__names - - def _set_names(self, v, load=False): - """ - Setter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/names (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_names() directly. - - YANG Description: List of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """names must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__names = t - if hasattr(self, '_set'): - self._set() - - def _unset_names(self): - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - usage = __builtin__.property(_get_usage) - names = __builtin__.property(_get_names) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py deleted file mode 100644 index 1c61ee406..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py +++ /dev/null @@ -1,326 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import primary_path -from . import backup_path -from . import tunnel_termination_points -from . import tunnels -class underlay(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Attributes of the TE link underlay. - """ - __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) - - _yang_name = 'underlay' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay'] - - def _get_enabled(self): - """ - Getter method for enabled, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/enabled (boolean) - - YANG Description: 'true' if the underlay is enabled. -'false' if the underlay is disabled. - """ - return self.__enabled - - def _set_enabled(self, v, load=False): - """ - Setter method for enabled, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/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: 'true' if the underlay is enabled. -'false' if the underlay is 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - - - def _get_primary_path(self): - """ - Getter method for primary_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path (container) - - YANG Description: The service path on the underlay topology that -supports this link. - """ - return self.__primary_path - - def _set_primary_path(self, v, load=False): - """ - Setter method for primary_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_primary_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_primary_path() directly. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """primary_path must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__primary_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_primary_path(self): - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_backup_path(self): - """ - Getter method for backup_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path (list) - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - return self.__backup_path - - def _set_backup_path(self, v, load=False): - """ - Setter method for backup_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_backup_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_backup_path() directly. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """backup_path must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__backup_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_backup_path(self): - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_protection_type(self): - """ - Getter method for protection_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/protection_type (identityref) - - YANG Description: Underlay protection type desired for this link. - """ - return self.__protection_type - - def _set_protection_type(self, v, load=False): - """ - Setter method for protection_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/protection_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_protection_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_protection_type() directly. - - YANG Description: Underlay protection type desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """protection_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__protection_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_protection_type(self): - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_tunnel_termination_points(self): - """ - Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points (container) - - YANG Description: Underlay TTPs desired for this link. - """ - return self.__tunnel_termination_points - - def _set_tunnel_termination_points(self, v, load=False): - """ - Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_termination_points is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_termination_points() directly. - - YANG Description: Underlay TTPs desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_termination_points must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__tunnel_termination_points = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_termination_points(self): - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_tunnels(self): - """ - Getter method for tunnels, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels (container) - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - return self.__tunnels - - def _set_tunnels(self, v, load=False): - """ - Setter method for tunnels, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnels is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnels() directly. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnels must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__tunnels = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnels(self): - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - enabled = __builtin__.property(_get_enabled) - primary_path = __builtin__.property(_get_primary_path) - backup_path = __builtin__.property(_get_backup_path) - protection_type = __builtin__.property(_get_protection_type) - tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points) - tunnels = __builtin__.property(_get_tunnels) - - - _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py deleted file mode 100644 index 92cc32717..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py +++ /dev/null @@ -1,207 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class backup_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) - - _yang_name = 'backup-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/index (uint32) - - YANG Description: A sequence number to identify a backup path. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: A sequence number to identify a backup path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element (list) - - YANG Description: A list of path elements describing the backup service -path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the backup service -path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - index = __builtin__.property(_get_index) - network_ref = __builtin__.property(_get_network_ref) - path_element = __builtin__.property(_get_path_element) - - - _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py deleted file mode 100644 index 782347073..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py +++ /dev/null @@ -1,321 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the backup service -path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - path_element_id = __builtin__.property(_get_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index 75444961d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py deleted file mode 100644 index 77ca590bd..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index ecefaca5f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index f9e7d7a3d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index b1433a162..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index 919cb958e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index 4268b0489..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py deleted file mode 100644 index 6f8297c24..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class primary_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) - - _yang_name = 'primary-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element (list) - - YANG Description: A list of path elements describing the service path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the service path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - network_ref = __builtin__.property(_get_network_ref) - path_element = __builtin__.property(_get_path_element) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py deleted file mode 100644 index 0c5b869f6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py +++ /dev/null @@ -1,320 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the service path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - path_element_id = __builtin__.property(_get_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index f66d7136e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py deleted file mode 100644 index 591338404..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index 5702d3150..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 7d8a5775c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index ef124eada..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index 15377f86d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index b950c2358..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py deleted file mode 100644 index f6a6987ff..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel_termination_points(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/tunnel-termination-points. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TTPs desired for this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) - - _yang_name = 'tunnel-termination-points' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'tunnel-termination-points'] - - def _get_source(self): - """ - Getter method for source, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/source (binary) - - YANG Description: Source TTP identifier. - """ - return self.__source - - def _set_source(self, v, load=False): - """ - Setter method for source, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/source (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_source is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_source() directly. - - YANG Description: Source TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """source must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False)""", - }) - - self.__source = t - if hasattr(self, '_set'): - self._set() - - def _unset_source(self): - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) - - - def _get_destination(self): - """ - Getter method for destination, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/destination (binary) - - YANG Description: Destination TTP identifier. - """ - return self.__destination - - def _set_destination(self, v, load=False): - """ - Setter method for destination, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/destination (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_destination is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_destination() directly. - - YANG Description: Destination TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """destination must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False)""", - }) - - self.__destination = t - if hasattr(self, '_set'): - self._set() - - def _unset_destination(self): - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) - - source = __builtin__.property(_get_source) - destination = __builtin__.property(_get_destination) - - - _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py deleted file mode 100644 index b1d6cf9df..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py +++ /dev/null @@ -1,167 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tunnel -class tunnels(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/tunnels. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) - - _yang_name = 'tunnels' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'tunnels'] - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - - - def _get_tunnel(self): - """ - Getter method for tunnel, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel (list) - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - return self.__tunnel - - def _set_tunnel(self, v, load=False): - """ - Setter method for tunnel, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel() directly. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__tunnel = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel(self): - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - sharing = __builtin__.property(_get_sharing) - tunnel = __builtin__.property(_get_tunnel) - - - _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py deleted file mode 100644 index 8f8593123..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py +++ /dev/null @@ -1,170 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/tunnels/tunnel. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) - - _yang_name = 'tunnel' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'tunnels', 'tunnel'] - - def _get_tunnel_name(self): - """ - Getter method for tunnel_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/tunnel_name (string) - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - return self.__tunnel_name - - def _set_tunnel_name(self, v, load=False): - """ - Setter method for tunnel_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/tunnel_name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_name() directly. - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - 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=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__tunnel_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_name(self): - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) - - tunnel_name = __builtin__.property(_get_tunnel_name) - sharing = __builtin__.property(_get_sharing) - - - _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py deleted file mode 100644 index 1ee93c90f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py +++ /dev/null @@ -1,248 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import topology -class information_source_state(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/information-source-state. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains state attributes related to the information -source. - """ - __slots__ = ('_path_helper', '_extmethods', '__credibility_preference','__logical_network_element','__network_instance','__topology',) - - _yang_name = 'information-source-state' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'information-source-state'] - - def _get_credibility_preference(self): - """ - Getter method for credibility_preference, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/credibility_preference (uint16) - - YANG Description: The preference value for calculating the Traffic -Engineering database credibility value used for -tie-break selection between different information-source -values. A higher value is preferable. - """ - return self.__credibility_preference - - def _set_credibility_preference(self, v, load=False): - """ - Setter method for credibility_preference, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/credibility_preference (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_credibility_preference is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_credibility_preference() directly. - - YANG Description: The preference value for calculating the Traffic -Engineering database credibility value used for -tie-break selection between different information-source -values. A higher value is preferable. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """credibility_preference must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False)""", - }) - - self.__credibility_preference = t - if hasattr(self, '_set'): - self._set() - - def _unset_credibility_preference(self): - self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - - - def _get_logical_network_element(self): - """ - Getter method for logical_network_element, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/logical_network_element (string) - - YANG Description: When applicable, this is the name of a logical network -element from which the information is learned. - """ - return self.__logical_network_element - - def _set_logical_network_element(self, v, load=False): - """ - Setter method for logical_network_element, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/logical_network_element (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_logical_network_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_logical_network_element() directly. - - YANG Description: When applicable, this is the name of a logical network -element from which the information is learned. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """logical_network_element must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__logical_network_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_logical_network_element(self): - self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_network_instance(self): - """ - Getter method for network_instance, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/network_instance (string) - - YANG Description: When applicable, this is the name of a network instance -from which the information is learned. - """ - return self.__network_instance - - def _set_network_instance(self, v, load=False): - """ - Setter method for network_instance, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/network_instance (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_instance is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_instance() directly. - - YANG Description: When applicable, this is the name of a network instance -from which the information is learned. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_instance must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__network_instance = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_instance(self): - self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_topology(self): - """ - Getter method for topology, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/topology (container) - - YANG Description: When the information is processed by the system, -the attributes in this container indicate which topology -is used to generate the result information. - """ - return self.__topology - - def _set_topology(self, v, load=False): - """ - Setter method for topology, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/topology (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_topology is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_topology() directly. - - YANG Description: When the information is processed by the system, -the attributes in this container indicate which topology -is used to generate the result information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """topology must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__topology = t - if hasattr(self, '_set'): - self._set() - - def _unset_topology(self): - self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - credibility_preference = __builtin__.property(_get_credibility_preference) - logical_network_element = __builtin__.property(_get_logical_network_element) - network_instance = __builtin__.property(_get_network_instance) - topology = __builtin__.property(_get_topology) - - - _pyangbind_elements = OrderedDict([('credibility_preference', credibility_preference), ('logical_network_element', logical_network_element), ('network_instance', network_instance), ('topology', topology), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py deleted file mode 100644 index 5fc5e047b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class topology(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/information-source-state/topology. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: When the information is processed by the system, -the attributes in this container indicate which topology -is used to generate the result information. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_ref','__network_ref',) - - _yang_name = 'topology' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'information-source-state', 'topology'] - - def _get_node_ref(self): - """ - Getter method for node_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/topology/node_ref (leafref) - - YANG Description: Used to reference a node. -Nodes are identified relative to the network that -contains them. - """ - return self.__node_ref - - def _set_node_ref(self, v, load=False): - """ - Setter method for node_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/topology/node_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_ref() directly. - - YANG Description: Used to reference a node. -Nodes are identified relative to the network that -contains them. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__node_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_ref(self): - self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/topology/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/topology/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - node_ref = __builtin__.property(_get_node_ref) - network_ref = __builtin__.property(_get_network_ref) - - - _pyangbind_elements = OrderedDict([('node_ref', node_ref), ('network_ref', network_ref), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py deleted file mode 100644 index c0d77ce6f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class underlay_topology(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/underlay-topology. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: When an abstract node encapsulates a topology, the -attributes in this container point to said topology. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref',) - - _yang_name = 'underlay-topology' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', 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 ['networks', 'network', 'node', 'te', 'information-source-entry', 'underlay-topology'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/underlay_topology/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/underlay_topology/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - network_ref = __builtin__.property(_get_network_ref) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_state/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_state/__init__.py deleted file mode 100644 index 7767ff2b6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_state/__init__.py +++ /dev/null @@ -1,248 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import topology -class information_source_state(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-state. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains state attributes related to the information -source. - """ - __slots__ = ('_path_helper', '_extmethods', '__credibility_preference','__logical_network_element','__network_instance','__topology',) - - _yang_name = 'information-source-state' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'information-source-state'] - - def _get_credibility_preference(self): - """ - Getter method for credibility_preference, mapped from YANG variable /networks/network/node/te/information_source_state/credibility_preference (uint16) - - YANG Description: The preference value for calculating the Traffic -Engineering database credibility value used for -tie-break selection between different information-source -values. A higher value is preferable. - """ - return self.__credibility_preference - - def _set_credibility_preference(self, v, load=False): - """ - Setter method for credibility_preference, mapped from YANG variable /networks/network/node/te/information_source_state/credibility_preference (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_credibility_preference is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_credibility_preference() directly. - - YANG Description: The preference value for calculating the Traffic -Engineering database credibility value used for -tie-break selection between different information-source -values. A higher value is preferable. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """credibility_preference must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False)""", - }) - - self.__credibility_preference = t - if hasattr(self, '_set'): - self._set() - - def _unset_credibility_preference(self): - self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) - - - def _get_logical_network_element(self): - """ - Getter method for logical_network_element, mapped from YANG variable /networks/network/node/te/information_source_state/logical_network_element (string) - - YANG Description: When applicable, this is the name of a logical network -element from which the information is learned. - """ - return self.__logical_network_element - - def _set_logical_network_element(self, v, load=False): - """ - Setter method for logical_network_element, mapped from YANG variable /networks/network/node/te/information_source_state/logical_network_element (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_logical_network_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_logical_network_element() directly. - - YANG Description: When applicable, this is the name of a logical network -element from which the information is learned. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """logical_network_element must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__logical_network_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_logical_network_element(self): - self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_network_instance(self): - """ - Getter method for network_instance, mapped from YANG variable /networks/network/node/te/information_source_state/network_instance (string) - - YANG Description: When applicable, this is the name of a network instance -from which the information is learned. - """ - return self.__network_instance - - def _set_network_instance(self, v, load=False): - """ - Setter method for network_instance, mapped from YANG variable /networks/network/node/te/information_source_state/network_instance (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_instance is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_instance() directly. - - YANG Description: When applicable, this is the name of a network instance -from which the information is learned. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_instance must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__network_instance = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_instance(self): - self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - - def _get_topology(self): - """ - Getter method for topology, mapped from YANG variable /networks/network/node/te/information_source_state/topology (container) - - YANG Description: When the information is processed by the system, -the attributes in this container indicate which topology -is used to generate the result information. - """ - return self.__topology - - def _set_topology(self, v, load=False): - """ - Setter method for topology, mapped from YANG variable /networks/network/node/te/information_source_state/topology (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_topology is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_topology() directly. - - YANG Description: When the information is processed by the system, -the attributes in this container indicate which topology -is used to generate the result information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """topology must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__topology = t - if hasattr(self, '_set'): - self._set() - - def _unset_topology(self): - self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - credibility_preference = __builtin__.property(_get_credibility_preference) - logical_network_element = __builtin__.property(_get_logical_network_element) - network_instance = __builtin__.property(_get_network_instance) - topology = __builtin__.property(_get_topology) - - - _pyangbind_elements = OrderedDict([('credibility_preference', credibility_preference), ('logical_network_element', logical_network_element), ('network_instance', network_instance), ('topology', topology), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_state/topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_state/topology/__init__.py deleted file mode 100644 index 6562d9003..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/information_source_state/topology/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class topology(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/information-source-state/topology. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: When the information is processed by the system, -the attributes in this container indicate which topology -is used to generate the result information. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_ref','__network_ref',) - - _yang_name = 'topology' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', 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 ['networks', 'network', 'node', 'te', 'information-source-state', 'topology'] - - def _get_node_ref(self): - """ - Getter method for node_ref, mapped from YANG variable /networks/network/node/te/information_source_state/topology/node_ref (leafref) - - YANG Description: Used to reference a node. -Nodes are identified relative to the network that -contains them. - """ - return self.__node_ref - - def _set_node_ref(self, v, load=False): - """ - Setter method for node_ref, mapped from YANG variable /networks/network/node/te/information_source_state/topology/node_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_ref() directly. - - YANG Description: Used to reference a node. -Nodes are identified relative to the network that -contains them. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__node_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_ref(self): - self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_state/topology/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_state/topology/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) - - node_ref = __builtin__.property(_get_node_ref) - network_ref = __builtin__.property(_get_network_ref) - - - _pyangbind_elements = OrderedDict([('node_ref', node_ref), ('network_ref', network_ref), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/statistics/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/statistics/__init__.py deleted file mode 100644 index 6741fb0fd..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/statistics/__init__.py +++ /dev/null @@ -1,207 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import node -from . import connectivity_matrix_entry -class statistics(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/statistics. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Statistics data. - """ - __slots__ = ('_path_helper', '_extmethods', '__discontinuity_time','__node','__connectivity_matrix_entry',) - - _yang_name = 'statistics' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__discontinuity_time = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) - self.__node = YANGDynClass(base=node.node, is_container='container', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__connectivity_matrix_entry = YANGDynClass(base=connectivity_matrix_entry.connectivity_matrix_entry, is_container='container', yang_name="connectivity-matrix-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'statistics'] - - def _get_discontinuity_time(self): - """ - Getter method for discontinuity_time, mapped from YANG variable /networks/network/node/te/statistics/discontinuity_time (yang:date-and-time) - - YANG Description: The time of the most recent occasion at which any one or -more of this interface's counters suffered a -discontinuity. If no such discontinuities have occurred -since the last re-initialization of the local management -subsystem, then this node contains the time the local -management subsystem re-initialized itself. - """ - return self.__discontinuity_time - - def _set_discontinuity_time(self, v, load=False): - """ - Setter method for discontinuity_time, mapped from YANG variable /networks/network/node/te/statistics/discontinuity_time (yang:date-and-time) - If this variable is read-only (config: false) in the - source YANG file, then _set_discontinuity_time is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_discontinuity_time() directly. - - YANG Description: The time of the most recent occasion at which any one or -more of this interface's counters suffered a -discontinuity. If no such discontinuities have occurred -since the last re-initialization of the local management -subsystem, then this node contains the time the local -management subsystem re-initialized itself. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """discontinuity_time must be of a type compatible with yang:date-and-time""", - 'defined-type': "yang:date-and-time", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False)""", - }) - - self.__discontinuity_time = t - if hasattr(self, '_set'): - self._set() - - def _unset_discontinuity_time(self): - self.__discontinuity_time = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) - - - def _get_node(self): - """ - Getter method for node, mapped from YANG variable /networks/network/node/te/statistics/node (container) - - YANG Description: Contains statistics attributes at the TE node level. - """ - return self.__node - - def _set_node(self, v, load=False): - """ - Setter method for node, mapped from YANG variable /networks/network/node/te/statistics/node (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_node is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node() directly. - - YANG Description: Contains statistics attributes at the TE node level. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=node.node, is_container='container', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=node.node, is_container='container', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__node = t - if hasattr(self, '_set'): - self._set() - - def _unset_node(self): - self.__node = YANGDynClass(base=node.node, is_container='container', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_connectivity_matrix_entry(self): - """ - Getter method for connectivity_matrix_entry, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry (container) - - YANG Description: Contains statistics attributes at the level of a -connectivity matrix entry. - """ - return self.__connectivity_matrix_entry - - def _set_connectivity_matrix_entry(self, v, load=False): - """ - Setter method for connectivity_matrix_entry, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_connectivity_matrix_entry is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_connectivity_matrix_entry() directly. - - YANG Description: Contains statistics attributes at the level of a -connectivity matrix entry. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=connectivity_matrix_entry.connectivity_matrix_entry, is_container='container', yang_name="connectivity-matrix-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """connectivity_matrix_entry must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=connectivity_matrix_entry.connectivity_matrix_entry, is_container='container', yang_name="connectivity-matrix-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__connectivity_matrix_entry = t - if hasattr(self, '_set'): - self._set() - - def _unset_connectivity_matrix_entry(self): - self.__connectivity_matrix_entry = YANGDynClass(base=connectivity_matrix_entry.connectivity_matrix_entry, is_container='container', yang_name="connectivity-matrix-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - discontinuity_time = __builtin__.property(_get_discontinuity_time) - node = __builtin__.property(_get_node) - connectivity_matrix_entry = __builtin__.property(_get_connectivity_matrix_entry) - - - _pyangbind_elements = OrderedDict([('discontinuity_time', discontinuity_time), ('node', node), ('connectivity_matrix_entry', connectivity_matrix_entry), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py deleted file mode 100644 index 7c96f28c4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py +++ /dev/null @@ -1,282 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class connectivity_matrix_entry(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/statistics/connectivity-matrix-entry. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains statistics attributes at the level of a -connectivity matrix entry. - """ - __slots__ = ('_path_helper', '_extmethods', '__creates','__deletes','__disables','__enables','__modifies',) - - _yang_name = 'connectivity-matrix-entry' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__creates = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__deletes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', 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 ['networks', 'network', 'node', 'te', 'statistics', 'connectivity-matrix-entry'] - - def _get_creates(self): - """ - Getter method for creates, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/creates (yang:counter32) - - YANG Description: Number of times that a connectivity matrix entry was -created. - """ - return self.__creates - - def _set_creates(self, v, load=False): - """ - Setter method for creates, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/creates (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_creates is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_creates() directly. - - YANG Description: Number of times that a connectivity matrix entry was -created. - """ - 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="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """creates must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__creates = t - if hasattr(self, '_set'): - self._set() - - def _unset_creates(self): - self.__creates = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_deletes(self): - """ - Getter method for deletes, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/deletes (yang:counter32) - - YANG Description: Number of times that a connectivity matrix entry was -deleted. - """ - return self.__deletes - - def _set_deletes(self, v, load=False): - """ - Setter method for deletes, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/deletes (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_deletes is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_deletes() directly. - - YANG Description: Number of times that a connectivity matrix entry was -deleted. - """ - 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="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """deletes must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__deletes = t - if hasattr(self, '_set'): - self._set() - - def _unset_deletes(self): - self.__deletes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_disables(self): - """ - Getter method for disables, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/disables (yang:counter32) - - YANG Description: Number of times that a connectivity matrix entry was -disabled. - """ - return self.__disables - - def _set_disables(self, v, load=False): - """ - Setter method for disables, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/disables (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_disables is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_disables() directly. - - YANG Description: Number of times that a connectivity matrix entry was -disabled. - """ - 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="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """disables must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__disables = t - if hasattr(self, '_set'): - self._set() - - def _unset_disables(self): - self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_enables(self): - """ - Getter method for enables, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/enables (yang:counter32) - - YANG Description: Number of times that a connectivity matrix entry was -enabled. - """ - return self.__enables - - def _set_enables(self, v, load=False): - """ - Setter method for enables, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/enables (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_enables is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_enables() directly. - - YANG Description: Number of times that a connectivity matrix entry was -enabled. - """ - 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="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """enables must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__enables = t - if hasattr(self, '_set'): - self._set() - - def _unset_enables(self): - self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_modifies(self): - """ - Getter method for modifies, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/modifies (yang:counter32) - - YANG Description: Number of times that a connectivity matrix entry was -modified. - """ - return self.__modifies - - def _set_modifies(self, v, load=False): - """ - Setter method for modifies, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/modifies (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_modifies is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_modifies() directly. - - YANG Description: Number of times that a connectivity matrix entry was -modified. - """ - 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="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """modifies must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__modifies = t - if hasattr(self, '_set'): - self._set() - - def _unset_modifies(self): - self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - creates = __builtin__.property(_get_creates) - deletes = __builtin__.property(_get_deletes) - disables = __builtin__.property(_get_disables) - enables = __builtin__.property(_get_enables) - modifies = __builtin__.property(_get_modifies) - - - _pyangbind_elements = OrderedDict([('creates', creates), ('deletes', deletes), ('disables', disables), ('enables', enables), ('modifies', modifies), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/statistics/node/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/statistics/node/__init__.py deleted file mode 100644 index 4d1e11b5e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/statistics/node/__init__.py +++ /dev/null @@ -1,273 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class node(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/statistics/node. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains statistics attributes at the TE node level. - """ - __slots__ = ('_path_helper', '_extmethods', '__disables','__enables','__maintenance_sets','__maintenance_clears','__modifies',) - - _yang_name = 'node' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__maintenance_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__maintenance_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', 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 ['networks', 'network', 'node', 'te', 'statistics', 'node'] - - def _get_disables(self): - """ - Getter method for disables, mapped from YANG variable /networks/network/node/te/statistics/node/disables (yang:counter32) - - YANG Description: Number of times that a node was disabled. - """ - return self.__disables - - def _set_disables(self, v, load=False): - """ - Setter method for disables, mapped from YANG variable /networks/network/node/te/statistics/node/disables (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_disables is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_disables() directly. - - YANG Description: Number of times that a node was disabled. - """ - 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="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """disables must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__disables = t - if hasattr(self, '_set'): - self._set() - - def _unset_disables(self): - self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_enables(self): - """ - Getter method for enables, mapped from YANG variable /networks/network/node/te/statistics/node/enables (yang:counter32) - - YANG Description: Number of times that a node was enabled. - """ - return self.__enables - - def _set_enables(self, v, load=False): - """ - Setter method for enables, mapped from YANG variable /networks/network/node/te/statistics/node/enables (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_enables is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_enables() directly. - - YANG Description: Number of times that a node was enabled. - """ - 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="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """enables must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__enables = t - if hasattr(self, '_set'): - self._set() - - def _unset_enables(self): - self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_maintenance_sets(self): - """ - Getter method for maintenance_sets, mapped from YANG variable /networks/network/node/te/statistics/node/maintenance_sets (yang:counter32) - - YANG Description: Number of times that a node was put in maintenance. - """ - return self.__maintenance_sets - - def _set_maintenance_sets(self, v, load=False): - """ - Setter method for maintenance_sets, mapped from YANG variable /networks/network/node/te/statistics/node/maintenance_sets (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_maintenance_sets is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_maintenance_sets() directly. - - YANG Description: Number of times that a node was put in maintenance. - """ - 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="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """maintenance_sets must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__maintenance_sets = t - if hasattr(self, '_set'): - self._set() - - def _unset_maintenance_sets(self): - self.__maintenance_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_maintenance_clears(self): - """ - Getter method for maintenance_clears, mapped from YANG variable /networks/network/node/te/statistics/node/maintenance_clears (yang:counter32) - - YANG Description: Number of times that a node was taken out of -maintenance. - """ - return self.__maintenance_clears - - def _set_maintenance_clears(self, v, load=False): - """ - Setter method for maintenance_clears, mapped from YANG variable /networks/network/node/te/statistics/node/maintenance_clears (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_maintenance_clears is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_maintenance_clears() directly. - - YANG Description: Number of times that a node was taken out of -maintenance. - """ - 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="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """maintenance_clears must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__maintenance_clears = t - if hasattr(self, '_set'): - self._set() - - def _unset_maintenance_clears(self): - self.__maintenance_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_modifies(self): - """ - Getter method for modifies, mapped from YANG variable /networks/network/node/te/statistics/node/modifies (yang:counter32) - - YANG Description: Number of times that a node was modified. - """ - return self.__modifies - - def _set_modifies(self, v, load=False): - """ - Setter method for modifies, mapped from YANG variable /networks/network/node/te/statistics/node/modifies (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_modifies is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_modifies() directly. - - YANG Description: Number of times that a node was modified. - """ - 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="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """modifies must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__modifies = t - if hasattr(self, '_set'): - self._set() - - def _unset_modifies(self): - self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - disables = __builtin__.property(_get_disables) - enables = __builtin__.property(_get_enables) - maintenance_sets = __builtin__.property(_get_maintenance_sets) - maintenance_clears = __builtin__.property(_get_maintenance_clears) - modifies = __builtin__.property(_get_modifies) - - - _pyangbind_elements = OrderedDict([('disables', disables), ('enables', enables), ('maintenance_sets', maintenance_sets), ('maintenance_clears', maintenance_clears), ('modifies', modifies), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/__init__.py deleted file mode 100644 index 08e7f93be..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/__init__.py +++ /dev/null @@ -1,357 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import connectivity_matrices -from . import underlay_topology -class te_node_attributes(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains node attributes in a TE topology. - """ - __slots__ = ('_path_helper', '_extmethods', '__admin_status','__connectivity_matrices','__domain_id','__is_abstract','__name','__signaling_address','__underlay_topology',) - - _yang_name = 'te-node-attributes' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - self.__connectivity_matrices = YANGDynClass(base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__domain_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__signaling_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True) - self.__underlay_topology = YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes'] - - def _get_admin_status(self): - """ - Getter method for admin_status, mapped from YANG variable /networks/network/node/te/te_node_attributes/admin_status (te-types:te-admin-status) - - YANG Description: The administrative state of the link. - """ - return self.__admin_status - - def _set_admin_status(self, v, load=False): - """ - Setter method for admin_status, mapped from YANG variable /networks/network/node/te/te_node_attributes/admin_status (te-types:te-admin-status) - If this variable is read-only (config: false) in the - source YANG file, then _set_admin_status is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_admin_status() directly. - - YANG Description: The administrative state of the link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """admin_status must be of a type compatible with te-types:te-admin-status""", - 'defined-type': "te-types:te-admin-status", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True)""", - }) - - self.__admin_status = t - if hasattr(self, '_set'): - self._set() - - def _unset_admin_status(self): - self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - - - def _get_connectivity_matrices(self): - """ - Getter method for connectivity_matrices, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices (container) - - YANG Description: Contains a connectivity matrix on a TE node. - """ - return self.__connectivity_matrices - - def _set_connectivity_matrices(self, v, load=False): - """ - Setter method for connectivity_matrices, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_connectivity_matrices is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_connectivity_matrices() directly. - - YANG Description: Contains a connectivity matrix on a TE node. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """connectivity_matrices must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__connectivity_matrices = t - if hasattr(self, '_set'): - self._set() - - def _unset_connectivity_matrices(self): - self.__connectivity_matrices = YANGDynClass(base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_domain_id(self): - """ - Getter method for domain_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/domain_id (uint32) - - YANG Description: Identifies the domain to which this node belongs. -This attribute is used to support inter-domain links. - """ - return self.__domain_id - - def _set_domain_id(self, v, load=False): - """ - Setter method for domain_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/domain_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_domain_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_domain_id() directly. - - YANG Description: Identifies the domain to which this node belongs. -This attribute is used to support inter-domain links. - """ - 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="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """domain_id 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="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__domain_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_domain_id(self): - self.__domain_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_is_abstract(self): - """ - Getter method for is_abstract, mapped from YANG variable /networks/network/node/te/te_node_attributes/is_abstract (empty) - - YANG Description: Present if the node is abstract; not present if the node -is actual. - """ - return self.__is_abstract - - def _set_is_abstract(self, v, load=False): - """ - Setter method for is_abstract, mapped from YANG variable /networks/network/node/te/te_node_attributes/is_abstract (empty) - If this variable is read-only (config: false) in the - source YANG file, then _set_is_abstract is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_is_abstract() directly. - - YANG Description: Present if the node is abstract; not present if the node -is actual. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """is_abstract must be of a type compatible with empty""", - 'defined-type': "empty", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True)""", - }) - - self.__is_abstract = t - if hasattr(self, '_set'): - self._set() - - def _unset_is_abstract(self): - self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) - - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/name (string) - - YANG Description: Node name. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Node name. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_signaling_address(self): - """ - Getter method for signaling_address, mapped from YANG variable /networks/network/node/te/te_node_attributes/signaling_address (inet:ip-address) - - YANG Description: The node's signaling address. - """ - return self.__signaling_address - - def _set_signaling_address(self, v, load=False): - """ - Setter method for signaling_address, mapped from YANG variable /networks/network/node/te/te_node_attributes/signaling_address (inet:ip-address) - If this variable is read-only (config: false) in the - source YANG file, then _set_signaling_address is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_signaling_address() directly. - - YANG Description: The node's signaling address. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """signaling_address must be of a type compatible with inet:ip-address""", - 'defined-type': "inet:ip-address", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True)""", - }) - - self.__signaling_address = t - if hasattr(self, '_set'): - self._set() - - def _unset_signaling_address(self): - self.__signaling_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True) - - - def _get_underlay_topology(self): - """ - Getter method for underlay_topology, mapped from YANG variable /networks/network/node/te/te_node_attributes/underlay_topology (container) - - YANG Description: When an abstract node encapsulates a topology, the -attributes in this container point to said topology. - """ - return self.__underlay_topology - - def _set_underlay_topology(self, v, load=False): - """ - Setter method for underlay_topology, mapped from YANG variable /networks/network/node/te/te_node_attributes/underlay_topology (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_underlay_topology is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_underlay_topology() directly. - - YANG Description: When an abstract node encapsulates a topology, the -attributes in this container point to said topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """underlay_topology must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__underlay_topology = t - if hasattr(self, '_set'): - self._set() - - def _unset_underlay_topology(self): - self.__underlay_topology = YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - admin_status = __builtin__.property(_get_admin_status, _set_admin_status) - connectivity_matrices = __builtin__.property(_get_connectivity_matrices, _set_connectivity_matrices) - domain_id = __builtin__.property(_get_domain_id, _set_domain_id) - is_abstract = __builtin__.property(_get_is_abstract, _set_is_abstract) - name = __builtin__.property(_get_name, _set_name) - signaling_address = __builtin__.property(_get_signaling_address, _set_signaling_address) - underlay_topology = __builtin__.property(_get_underlay_topology, _set_underlay_topology) - - - _pyangbind_elements = OrderedDict([('admin_status', admin_status), ('connectivity_matrices', connectivity_matrices), ('domain_id', domain_id), ('is_abstract', is_abstract), ('name', name), ('signaling_address', signaling_address), ('underlay_topology', underlay_topology), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py deleted file mode 100644 index e1a23ffc8..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py +++ /dev/null @@ -1,412 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restrictions -from . import underlay -from . import path_constraints -from . import optimizations -from . import path_properties -from . import connectivity_matrix -class connectivity_matrices(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains a connectivity matrix on a TE node. - """ - __slots__ = ('_path_helper', '_extmethods', '__number_of_entries','__label_restrictions','__is_allowed','__underlay','__path_constraints','__optimizations','__path_properties','__connectivity_matrix',) - - _yang_name = 'connectivity-matrices' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__number_of_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__connectivity_matrix = YANGDynClass(base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices'] - - def _get_number_of_entries(self): - """ - Getter method for number_of_entries, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/number_of_entries (uint16) - - YANG Description: The number of connectivity matrix entries. -If this number is specified in the configuration request, -the number is the requested number of entries, which may -not all be listed in the list; -if this number is reported in the state data, -the number is the current number of operational entries. - """ - return self.__number_of_entries - - def _set_number_of_entries(self, v, load=False): - """ - Setter method for number_of_entries, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/number_of_entries (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number_of_entries is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number_of_entries() directly. - - YANG Description: The number of connectivity matrix entries. -If this number is specified in the configuration request, -the number is the requested number of entries, which may -not all be listed in the list; -if this number is reported in the state data, -the number is the current number of operational entries. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number_of_entries must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True)""", - }) - - self.__number_of_entries = t - if hasattr(self, '_set'): - self._set() - - def _unset_number_of_entries(self): - self.__number_of_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) - - - def _get_label_restrictions(self): - """ - Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions (container) - - YANG Description: The label restrictions container. - """ - return self.__label_restrictions - - def _set_label_restrictions(self, v, load=False): - """ - Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restrictions is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restrictions() directly. - - YANG Description: The label restrictions container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restrictions must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_restrictions = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restrictions(self): - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_is_allowed(self): - """ - Getter method for is_allowed, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/is_allowed (boolean) - - YANG Description: 'true' - switching is allowed; -'false' - switching is disallowed. - """ - return self.__is_allowed - - def _set_is_allowed(self, v, load=False): - """ - Setter method for is_allowed, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/is_allowed (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_is_allowed is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_is_allowed() directly. - - YANG Description: 'true' - switching is allowed; -'false' - switching is disallowed. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """is_allowed must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__is_allowed = t - if hasattr(self, '_set'): - self._set() - - def _unset_is_allowed(self): - self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_underlay(self): - """ - Getter method for underlay, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay (container) - - YANG Description: Attributes of the TE link underlay. - """ - return self.__underlay - - def _set_underlay(self, v, load=False): - """ - Setter method for underlay, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_underlay is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_underlay() directly. - - YANG Description: Attributes of the TE link underlay. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """underlay must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__underlay = t - if hasattr(self, '_set'): - self._set() - - def _unset_underlay(self): - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_constraints(self): - """ - Getter method for path_constraints, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints (container) - - YANG Description: TE named path constraints container. - """ - return self.__path_constraints - - def _set_path_constraints(self, v, load=False): - """ - Setter method for path_constraints, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_constraints is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_constraints() directly. - - YANG Description: TE named path constraints container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_constraints must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_constraints = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_constraints(self): - self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_optimizations(self): - """ - Getter method for optimizations, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations (container) - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - return self.__optimizations - - def _set_optimizations(self, v, load=False): - """ - Setter method for optimizations, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_optimizations is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_optimizations() directly. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """optimizations must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__optimizations = t - if hasattr(self, '_set'): - self._set() - - def _unset_optimizations(self): - self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_properties(self): - """ - Getter method for path_properties, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties (container) - - YANG Description: The TE path properties. - """ - return self.__path_properties - - def _set_path_properties(self, v, load=False): - """ - Setter method for path_properties, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_properties is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_properties() directly. - - YANG Description: The TE path properties. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_properties must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_properties = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_properties(self): - self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_connectivity_matrix(self): - """ - Getter method for connectivity_matrix, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix (list) - - YANG Description: Represents a node's switching limitations, i.e., -limitations in the interconnecting network TE links -across the node. - """ - return self.__connectivity_matrix - - def _set_connectivity_matrix(self, v, load=False): - """ - Setter method for connectivity_matrix, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_connectivity_matrix is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_connectivity_matrix() directly. - - YANG Description: Represents a node's switching limitations, i.e., -limitations in the interconnecting network TE links -across the node. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """connectivity_matrix must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__connectivity_matrix = t - if hasattr(self, '_set'): - self._set() - - def _unset_connectivity_matrix(self): - self.__connectivity_matrix = YANGDynClass(base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - number_of_entries = __builtin__.property(_get_number_of_entries, _set_number_of_entries) - label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) - is_allowed = __builtin__.property(_get_is_allowed, _set_is_allowed) - underlay = __builtin__.property(_get_underlay, _set_underlay) - path_constraints = __builtin__.property(_get_path_constraints, _set_path_constraints) - optimizations = __builtin__.property(_get_optimizations, _set_optimizations) - path_properties = __builtin__.property(_get_path_properties) - connectivity_matrix = __builtin__.property(_get_connectivity_matrix, _set_connectivity_matrix) - - - _pyangbind_elements = OrderedDict([('number_of_entries', number_of_entries), ('label_restrictions', label_restrictions), ('is_allowed', is_allowed), ('underlay', underlay), ('path_constraints', path_constraints), ('optimizations', optimizations), ('path_properties', path_properties), ('connectivity_matrix', connectivity_matrix), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py deleted file mode 100644 index 704040fa4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py +++ /dev/null @@ -1,405 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import from_ -from . import to -from . import underlay -from . import path_constraints -from . import optimizations -from . import path_properties -class connectivity_matrix(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Represents a node's switching limitations, i.e., -limitations in the interconnecting network TE links -across the node. - """ - __slots__ = ('_path_helper', '_extmethods', '__id','__from_','__to','__is_allowed','__underlay','__path_constraints','__optimizations','__path_properties',) - - _yang_name = 'connectivity-matrix' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__from_ = YANGDynClass(base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__to = YANGDynClass(base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix'] - - def _get_id(self): - """ - Getter method for id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/id (uint32) - - YANG Description: Identifies the connectivity matrix entry. - """ - return self.__id - - def _set_id(self, v, load=False): - """ - Setter method for id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_id() directly. - - YANG Description: Identifies the connectivity matrix entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """id 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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__id = t - if hasattr(self, '_set'): - self._set() - - def _unset_id(self): - self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_from_(self): - """ - Getter method for from_, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from (container) - - YANG Description: Reference to a source LTP. - """ - return self.__from_ - - def _set_from_(self, v, load=False): - """ - Setter method for from_, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_from_ is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_from_() directly. - - YANG Description: Reference to a source LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """from_ must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__from_ = t - if hasattr(self, '_set'): - self._set() - - def _unset_from_(self): - self.__from_ = YANGDynClass(base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_to(self): - """ - Getter method for to, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to (container) - - YANG Description: Reference to a destination LTP. - """ - return self.__to - - def _set_to(self, v, load=False): - """ - Setter method for to, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_to is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_to() directly. - - YANG Description: Reference to a destination LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """to must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__to = t - if hasattr(self, '_set'): - self._set() - - def _unset_to(self): - self.__to = YANGDynClass(base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_is_allowed(self): - """ - Getter method for is_allowed, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/is_allowed (boolean) - - YANG Description: 'true' - switching is allowed; -'false' - switching is disallowed. - """ - return self.__is_allowed - - def _set_is_allowed(self, v, load=False): - """ - Setter method for is_allowed, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/is_allowed (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_is_allowed is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_is_allowed() directly. - - YANG Description: 'true' - switching is allowed; -'false' - switching is disallowed. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """is_allowed must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__is_allowed = t - if hasattr(self, '_set'): - self._set() - - def _unset_is_allowed(self): - self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_underlay(self): - """ - Getter method for underlay, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay (container) - - YANG Description: Attributes of the TE link underlay. - """ - return self.__underlay - - def _set_underlay(self, v, load=False): - """ - Setter method for underlay, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_underlay is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_underlay() directly. - - YANG Description: Attributes of the TE link underlay. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """underlay must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__underlay = t - if hasattr(self, '_set'): - self._set() - - def _unset_underlay(self): - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_constraints(self): - """ - Getter method for path_constraints, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints (container) - - YANG Description: TE named path constraints container. - """ - return self.__path_constraints - - def _set_path_constraints(self, v, load=False): - """ - Setter method for path_constraints, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_constraints is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_constraints() directly. - - YANG Description: TE named path constraints container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_constraints must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_constraints = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_constraints(self): - self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_optimizations(self): - """ - Getter method for optimizations, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations (container) - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - return self.__optimizations - - def _set_optimizations(self, v, load=False): - """ - Setter method for optimizations, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_optimizations is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_optimizations() directly. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """optimizations must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__optimizations = t - if hasattr(self, '_set'): - self._set() - - def _unset_optimizations(self): - self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_properties(self): - """ - Getter method for path_properties, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties (container) - - YANG Description: The TE path properties. - """ - return self.__path_properties - - def _set_path_properties(self, v, load=False): - """ - Setter method for path_properties, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_properties is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_properties() directly. - - YANG Description: The TE path properties. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_properties must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_properties = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_properties(self): - self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - id = __builtin__.property(_get_id, _set_id) - from_ = __builtin__.property(_get_from_, _set_from_) - to = __builtin__.property(_get_to, _set_to) - is_allowed = __builtin__.property(_get_is_allowed, _set_is_allowed) - underlay = __builtin__.property(_get_underlay, _set_underlay) - path_constraints = __builtin__.property(_get_path_constraints, _set_path_constraints) - optimizations = __builtin__.property(_get_optimizations, _set_optimizations) - path_properties = __builtin__.property(_get_path_properties) - - - _pyangbind_elements = OrderedDict([('id', id), ('from_', from_), ('to', to), ('is_allowed', is_allowed), ('underlay', underlay), ('path_constraints', path_constraints), ('optimizations', optimizations), ('path_properties', path_properties), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/__init__.py deleted file mode 100644 index 40157c904..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/__init__.py +++ /dev/null @@ -1,155 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restrictions -class from_(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Reference to a source LTP. - """ - __slots__ = ('_path_helper', '_extmethods', '__tp_ref','__label_restrictions',) - - _yang_name = 'from' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from'] - - def _get_tp_ref(self): - """ - Getter method for tp_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/tp_ref (leafref) - - YANG Description: Relative reference to a termination point. - """ - return self.__tp_ref - - def _set_tp_ref(self, v, load=False): - """ - Setter method for tp_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/tp_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tp_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tp_ref() directly. - - YANG Description: Relative reference to a termination point. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tp_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__tp_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_tp_ref(self): - self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_label_restrictions(self): - """ - Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions (container) - - YANG Description: The label restrictions container. - """ - return self.__label_restrictions - - def _set_label_restrictions(self, v, load=False): - """ - Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restrictions is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restrictions() directly. - - YANG Description: The label restrictions container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restrictions must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_restrictions = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restrictions(self): - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - tp_ref = __builtin__.property(_get_tp_ref, _set_tp_ref) - label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) - - - _pyangbind_elements = OrderedDict([('tp_ref', tp_ref), ('label_restrictions', label_restrictions), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py deleted file mode 100644 index 5a441f8e0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restriction -class label_restrictions(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The label restrictions container. - """ - __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) - - _yang_name = 'label-restrictions' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions'] - - def _get_label_restriction(self): - """ - Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction (list) - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - return self.__label_restriction - - def _set_label_restriction(self, v, load=False): - """ - Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restriction() directly. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restriction must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__label_restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restriction(self): - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) - - - _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py deleted file mode 100644 index be63791cb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py +++ /dev/null @@ -1,450 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_start -from . import label_end -from . import label_step -from . import otn_label_range -from . import ethernet_label_range -class label_restriction(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) - - _yang_name = 'label-restriction' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction'] - - def _get_restriction(self): - """ - Getter method for restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/restriction (enumeration) - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - return self.__restriction - - def _set_restriction(self, v, load=False): - """ - Setter method for restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/restriction (enumeration) - If this variable is read-only (config: false) in the - source YANG file, then _set_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restriction() directly. - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restriction must be of a type compatible with enumeration""", - 'defined-type': "ietf-te-topology:enumeration", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", - }) - - self.__restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_restriction(self): - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/index (uint32) - - YANG Description: The index of the label restriction list entry. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: The index of the label restriction list entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_label_start(self): - """ - Getter method for label_start, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start (container) - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - return self.__label_start - - def _set_label_start(self, v, load=False): - """ - Setter method for label_start, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_start is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_start() directly. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_start must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_start = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_start(self): - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_end(self): - """ - Getter method for label_end, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end (container) - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - return self.__label_end - - def _set_label_end(self, v, load=False): - """ - Setter method for label_end, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_end is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_end() directly. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_end must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_end = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_end(self): - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_step(self): - """ - Getter method for label_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step (container) - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - return self.__label_step - - def _set_label_step(self, v, load=False): - """ - Setter method for label_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_step() directly. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_step must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_step(self): - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_range_bitmap(self): - """ - Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - return self.__range_bitmap - - def _set_range_bitmap(self, v, load=False): - """ - Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_bitmap is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_bitmap() directly. - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", - 'defined-type': "yang:hex-string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", - }) - - self.__range_bitmap = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_bitmap(self): - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - - - def _get_otn_label_range(self): - """ - Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range (container) - - YANG Description: Label range information for OTN. - """ - return self.__otn_label_range - - def _set_otn_label_range(self, v, load=False): - """ - Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn_label_range() directly. - - YANG Description: Label range information for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn_label_range(self): - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_ethernet_label_range(self): - """ - Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range (container) - - YANG Description: Ethernet-specific label range related information. - """ - return self.__ethernet_label_range - - def _set_ethernet_label_range(self, v, load=False): - """ - Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_ethernet_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ethernet_label_range() directly. - - YANG Description: Ethernet-specific label range related information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ethernet_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__ethernet_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_ethernet_label_range(self): - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - restriction = __builtin__.property(_get_restriction, _set_restriction) - index = __builtin__.property(_get_index, _set_index) - label_start = __builtin__.property(_get_label_start, _set_label_start) - label_end = __builtin__.property(_get_label_end, _set_label_end) - label_step = __builtin__.property(_get_label_step, _set_label_step) - range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) - otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) - ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) - - - _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py deleted file mode 100644 index 85fe797a5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ethernet_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/ethernet-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Ethernet-specific label range related information. - """ - __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) - - _yang_name = 'ethernet-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] - - def _get_tag_type(self): - """ - Getter method for tag_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - - YANG Description: VLAN tag type. - """ - return self.__tag_type - - def _set_tag_type(self, v, load=False): - """ - Setter method for tag_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_tag_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tag_type() directly. - - YANG Description: VLAN tag type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", - 'defined-type': "etht-types:eth-tag-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", - }) - - self.__tag_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tag_type(self): - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - - YANG Description: priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - - tag_type = __builtin__.property(_get_tag_type, _set_tag_type) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py deleted file mode 100644 index 3d944dc6d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_end(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-end. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-end' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-end'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py deleted file mode 100644 index c0f426a02..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-end/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py deleted file mode 100644 index 252392100..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py deleted file mode 100644 index 7233908c1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_start(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-start. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-start' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-start'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py deleted file mode 100644 index c15cb8c1b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-start/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py deleted file mode 100644 index 29741fa5e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py deleted file mode 100644 index 076a06d96..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class label_step(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-step. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) - - _yang_name = 'label-step' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-step'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/generic (int32) - - YANG Description: Label range step. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/generic (int32) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Label range step. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with int32""", - 'defined-type': "int32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn (container) - - YANG Description: Label step for OTN - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label step for OTN - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_step(self): - """ - Getter method for eth_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/eth_step (uint16) - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - return self.__eth_step - - def _set_eth_step(self, v, load=False): - """ - Setter method for eth_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/eth_step (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_step() directly. - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_step must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", - }) - - self.__eth_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_step(self): - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_step = __builtin__.property(_get_eth_step, _set_eth_step) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py deleted file mode 100644 index 023f3d755..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-step/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label step for OTN - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py deleted file mode 100644 index 9e9f6bb66..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py +++ /dev/null @@ -1,256 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/otn-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label range information for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) - - _yang_name = 'otn-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'otn-label-range'] - - def _get_range_type(self): - """ - Getter method for range_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - return self.__range_type - - def _set_range_type(self, v, load=False): - """ - Setter method for range_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_type() directly. - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_type must be of a type compatible with otn-label-range-type""", - 'defined-type': "ietf-otn-topology:otn-label-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", - }) - - self.__range_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_type(self): - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_odu_type_list(self): - """ - Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - return self.__odu_type_list - - def _set_odu_type_list(self, v, load=False): - """ - Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type_list() directly. - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type_list must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type_list(self): - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/priority (uint8) - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - - range_type = __builtin__.property(_get_range_type, _set_range_type) - tsg = __builtin__.property(_get_tsg, _set_tsg) - odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py deleted file mode 100644 index dccc4ecbe..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py +++ /dev/null @@ -1,199 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import optimization_metric -from . import tiebreakers -from . import objective_function -class optimizations(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - __slots__ = ('_path_helper', '_extmethods', '__optimization_metric','__tiebreakers','__objective_function',) - - _yang_name = 'optimizations' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations'] - - def _get_optimization_metric(self): - """ - Getter method for optimization_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric (list) - - YANG Description: TE path metric type. - """ - return self.__optimization_metric - - def _set_optimization_metric(self, v, load=False): - """ - Setter method for optimization_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_optimization_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_optimization_metric() directly. - - YANG Description: TE path metric type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """optimization_metric must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__optimization_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_optimization_metric(self): - self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_tiebreakers(self): - """ - Getter method for tiebreakers, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers (container) - - YANG Description: Container for the list of tiebreakers. - """ - return self.__tiebreakers - - def _set_tiebreakers(self, v, load=False): - """ - Setter method for tiebreakers, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreakers is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreakers() directly. - - YANG Description: Container for the list of tiebreakers. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreakers must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tiebreakers = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreakers(self): - self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_objective_function(self): - """ - Getter method for objective_function, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function (container) - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - return self.__objective_function - - def _set_objective_function(self, v, load=False): - """ - Setter method for objective_function, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_objective_function is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_objective_function() directly. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """objective_function must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__objective_function = t - if hasattr(self, '_set'): - self._set() - - def _unset_objective_function(self): - self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - optimization_metric = __builtin__.property(_get_optimization_metric, _set_optimization_metric) - tiebreakers = __builtin__.property(_get_tiebreakers, _set_tiebreakers) - objective_function = __builtin__.property(_get_objective_function, _set_objective_function) - - __choices__ = {'algorithm': {'metric': ['optimization_metric', 'tiebreakers'], 'objective-function': ['objective_function']}} - _pyangbind_elements = OrderedDict([('optimization_metric', optimization_metric), ('tiebreakers', tiebreakers), ('objective_function', objective_function), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py deleted file mode 100644 index dd970e56f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class objective_function(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/objective-function. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - __slots__ = ('_path_helper', '_extmethods', '__objective_function_type',) - - _yang_name = 'objective-function' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'objective-function'] - - def _get_objective_function_type(self): - """ - Getter method for objective_function_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/objective_function_type (identityref) - - YANG Description: Objective function entry. - """ - return self.__objective_function_type - - def _set_objective_function_type(self, v, load=False): - """ - Setter method for objective_function_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/objective_function_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_objective_function_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_objective_function_type() directly. - - YANG Description: Objective function entry. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """objective_function_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__objective_function_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_objective_function_type(self): - self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - objective_function_type = __builtin__.property(_get_objective_function_type, _set_objective_function_type) - - __choices__ = {'algorithm': {'objective-function': ['objective_function_type']}} - _pyangbind_elements = OrderedDict([('objective_function_type', objective_function_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py deleted file mode 100644 index 63bedfaf5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py +++ /dev/null @@ -1,241 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import explicit_route_exclude_objects -from . import explicit_route_include_objects -class optimization_metric(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric type. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__weight','__explicit_route_exclude_objects','__explicit_route_include_objects',) - - _yang_name = 'optimization-metric' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/metric_type (identityref) - - YANG Description: Identifies the 'metric-type' that the path computation -process uses for optimization. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: Identifies the 'metric-type' that the path computation -process uses for optimization. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_weight(self): - """ - Getter method for weight, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/weight (uint8) - - YANG Description: TE path metric normalization weight. - """ - return self.__weight - - def _set_weight(self, v, load=False): - """ - Setter method for weight, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/weight (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_weight is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_weight() directly. - - YANG Description: TE path metric normalization weight. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """weight must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__weight = t - if hasattr(self, '_set'): - self._set() - - def _unset_weight(self): - self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_explicit_route_exclude_objects(self): - """ - Getter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects (container) - - YANG Description: Container for the 'exclude route' object list. - """ - return self.__explicit_route_exclude_objects - - def _set_explicit_route_exclude_objects(self, v, load=False): - """ - Setter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_explicit_route_exclude_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_explicit_route_exclude_objects() directly. - - YANG Description: Container for the 'exclude route' object list. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """explicit_route_exclude_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__explicit_route_exclude_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_explicit_route_exclude_objects(self): - self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_explicit_route_include_objects(self): - """ - Getter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects (container) - - YANG Description: Container for the 'include route' object list. - """ - return self.__explicit_route_include_objects - - def _set_explicit_route_include_objects(self, v, load=False): - """ - Setter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_explicit_route_include_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_explicit_route_include_objects() directly. - - YANG Description: Container for the 'include route' object list. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """explicit_route_include_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__explicit_route_include_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_explicit_route_include_objects(self): - self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - metric_type = __builtin__.property(_get_metric_type, _set_metric_type) - weight = __builtin__.property(_get_weight, _set_weight) - explicit_route_exclude_objects = __builtin__.property(_get_explicit_route_exclude_objects, _set_explicit_route_exclude_objects) - explicit_route_include_objects = __builtin__.property(_get_explicit_route_include_objects, _set_explicit_route_include_objects) - - __choices__ = {'algorithm': {'metric': ['metric_type', 'weight', 'explicit_route_exclude_objects', 'explicit_route_include_objects']}} - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('weight', weight), ('explicit_route_exclude_objects', explicit_route_exclude_objects), ('explicit_route_include_objects', explicit_route_include_objects), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py deleted file mode 100644 index 07c1656b9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import route_object_exclude_object -class explicit_route_exclude_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the 'exclude route' object list. - """ - __slots__ = ('_path_helper', '_extmethods', '__route_object_exclude_object',) - - _yang_name = 'explicit-route-exclude-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects'] - - def _get_route_object_exclude_object(self): - """ - Getter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - return self.__route_object_exclude_object - - def _set_route_object_exclude_object(self, v, load=False): - """ - Setter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_route_object_exclude_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_route_object_exclude_object() directly. - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """route_object_exclude_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__route_object_exclude_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_route_object_exclude_object(self): - self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - route_object_exclude_object = __builtin__.property(_get_route_object_exclude_object, _set_route_object_exclude_object) - - __choices__ = {'algorithm': {'metric': ['route_object_exclude_object']}} - _pyangbind_elements = OrderedDict([('route_object_exclude_object', route_object_exclude_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py deleted file mode 100644 index 4a4f8fd0f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py +++ /dev/null @@ -1,365 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -from . import srlg -class route_object_exclude_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop','__srlg',) - - _yang_name = 'route-object-exclude-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_srlg(self): - """ - Getter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) - - YANG Description: SRLG container. - """ - return self.__srlg - - def _set_srlg(self, v, load=False): - """ - Setter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_srlg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_srlg() directly. - - YANG Description: SRLG container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """srlg must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__srlg = t - if hasattr(self, '_set'): - self._set() - - def _unset_srlg(self): - self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - srlg = __builtin__.property(_get_srlg, _set_srlg) - - __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop'], 'srlg': ['srlg']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ('srlg', srlg), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py deleted file mode 100644 index 783159e57..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py deleted file mode 100644 index 484b23ab1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py deleted file mode 100644 index 6b55fb421..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index f11e3324c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py deleted file mode 100644 index 80a217af8..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py deleted file mode 100644 index 694b6a3c1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py deleted file mode 100644 index 9a858772e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py +++ /dev/null @@ -1,115 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class srlg(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/srlg. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: SRLG container. - """ - __slots__ = ('_path_helper', '_extmethods', '__srlg',) - - _yang_name = 'srlg' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'srlg'] - - def _get_srlg(self): - """ - Getter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) - - YANG Description: SRLG value. - """ - return self.__srlg - - def _set_srlg(self, v, load=False): - """ - Setter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_srlg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_srlg() directly. - - YANG Description: SRLG value. - """ - 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="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """srlg 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="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__srlg = t - if hasattr(self, '_set'): - self._set() - - def _unset_srlg(self): - self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - srlg = __builtin__.property(_get_srlg, _set_srlg) - - __choices__ = {'type': {'srlg': ['srlg']}} - _pyangbind_elements = OrderedDict([('srlg', srlg), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index 4a0e2b21e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py deleted file mode 100644 index cea85916d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import route_object_include_object -class explicit_route_include_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the 'include route' object list. - """ - __slots__ = ('_path_helper', '_extmethods', '__route_object_include_object',) - - _yang_name = 'explicit-route-include-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects'] - - def _get_route_object_include_object(self): - """ - Getter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - return self.__route_object_include_object - - def _set_route_object_include_object(self, v, load=False): - """ - Setter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_route_object_include_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_route_object_include_object() directly. - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """route_object_include_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__route_object_include_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_route_object_include_object(self): - self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - route_object_include_object = __builtin__.property(_get_route_object_include_object, _set_route_object_include_object) - - __choices__ = {'algorithm': {'metric': ['route_object_include_object']}} - _pyangbind_elements = OrderedDict([('route_object_include_object', route_object_include_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py deleted file mode 100644 index 1330f425e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py +++ /dev/null @@ -1,325 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class route_object_include_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'route-object-include-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py deleted file mode 100644 index edcea596e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py deleted file mode 100644 index 20d876129..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py deleted file mode 100644 index 2f3c37938..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index d9361ab75..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py deleted file mode 100644 index e53b4266d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py deleted file mode 100644 index f49e95c2a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index f69f0f6b7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py deleted file mode 100644 index e0333aee2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tiebreaker -class tiebreakers(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/tiebreakers. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of tiebreakers. - """ - __slots__ = ('_path_helper', '_extmethods', '__tiebreaker',) - - _yang_name = 'tiebreakers' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'tiebreakers'] - - def _get_tiebreaker(self): - """ - Getter method for tiebreaker, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker (list) - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - return self.__tiebreaker - - def _set_tiebreaker(self, v, load=False): - """ - Setter method for tiebreaker, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreaker is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreaker() directly. - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreaker must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__tiebreaker = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreaker(self): - self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - tiebreaker = __builtin__.property(_get_tiebreaker, _set_tiebreaker) - - __choices__ = {'algorithm': {'metric': ['tiebreaker']}} - _pyangbind_elements = OrderedDict([('tiebreaker', tiebreaker), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py deleted file mode 100644 index 26464cef2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py +++ /dev/null @@ -1,122 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tiebreaker(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/tiebreakers/tiebreaker. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - __slots__ = ('_path_helper', '_extmethods', '__tiebreaker_type',) - - _yang_name = 'tiebreaker' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'tiebreakers', 'tiebreaker'] - - def _get_tiebreaker_type(self): - """ - Getter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) - - YANG Description: Identifies an entry in the list of tiebreakers. - """ - return self.__tiebreaker_type - - def _set_tiebreaker_type(self, v, load=False): - """ - Setter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreaker_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreaker_type() directly. - - YANG Description: Identifies an entry in the list of tiebreakers. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreaker_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tiebreaker_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreaker_type(self): - self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - tiebreaker_type = __builtin__.property(_get_tiebreaker_type, _set_tiebreaker_type) - - __choices__ = {'algorithm': {'metric': ['tiebreaker_type']}} - _pyangbind_elements = OrderedDict([('tiebreaker_type', tiebreaker_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py deleted file mode 100644 index 2b9f4b692..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py +++ /dev/null @@ -1,523 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -from . import path_metric_bounds -from . import path_affinities_values -from . import path_affinity_names -from . import path_srlgs_lists -from . import path_srlgs_names -class path_constraints(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE named path constraints container. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth','__link_protection','__setup_priority','__hold_priority','__signaling_type','__path_metric_bounds','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__disjointness',) - - _yang_name = 'path-constraints' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints'] - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_link_protection(self): - """ - Getter method for link_protection, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/link_protection (identityref) - - YANG Description: Link protection type required for the links included -in the computed path. - """ - return self.__link_protection - - def _set_link_protection(self, v, load=False): - """ - Setter method for link_protection, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/link_protection (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_protection is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_protection() directly. - - YANG Description: Link protection type required for the links included -in the computed path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_protection must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__link_protection = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_protection(self): - self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_setup_priority(self): - """ - Getter method for setup_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/setup_priority (uint8) - - YANG Description: TE LSP requested setup priority. - """ - return self.__setup_priority - - def _set_setup_priority(self, v, load=False): - """ - Setter method for setup_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/setup_priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_setup_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_setup_priority() directly. - - YANG Description: TE LSP requested setup priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """setup_priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__setup_priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_setup_priority(self): - self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_hold_priority(self): - """ - Getter method for hold_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/hold_priority (uint8) - - YANG Description: TE LSP requested hold priority. - """ - return self.__hold_priority - - def _set_hold_priority(self, v, load=False): - """ - Setter method for hold_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/hold_priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_hold_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hold_priority() directly. - - YANG Description: TE LSP requested hold priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hold_priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__hold_priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_hold_priority(self): - self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_signaling_type(self): - """ - Getter method for signaling_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/signaling_type (identityref) - - YANG Description: TE tunnel path signaling type. - """ - return self.__signaling_type - - def _set_signaling_type(self, v, load=False): - """ - Setter method for signaling_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/signaling_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_signaling_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_signaling_type() directly. - - YANG Description: TE tunnel path signaling type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """signaling_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__signaling_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_signaling_type(self): - self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_path_metric_bounds(self): - """ - Getter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds (container) - - YANG Description: TE path metric bounds container. - """ - return self.__path_metric_bounds - - def _set_path_metric_bounds(self, v, load=False): - """ - Setter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric_bounds is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric_bounds() directly. - - YANG Description: TE path metric bounds container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric_bounds must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_metric_bounds = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric_bounds(self): - self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_affinities_values(self): - """ - Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values (container) - - YANG Description: Path affinities represented as values. - """ - return self.__path_affinities_values - - def _set_path_affinities_values(self, v, load=False): - """ - Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_values() directly. - - YANG Description: Path affinities represented as values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_values must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_affinities_values = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_values(self): - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_affinity_names(self): - """ - Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names (container) - - YANG Description: Path affinities represented as names. - """ - return self.__path_affinity_names - - def _set_path_affinity_names(self, v, load=False): - """ - Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_names() directly. - - YANG Description: Path affinities represented as names. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_affinity_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_names(self): - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_srlgs_lists(self): - """ - Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists (container) - - YANG Description: Path SRLG properties container. - """ - return self.__path_srlgs_lists - - def _set_path_srlgs_lists(self, v, load=False): - """ - Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_lists is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_lists() directly. - - YANG Description: Path SRLG properties container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_lists must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_srlgs_lists = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_lists(self): - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_srlgs_names(self): - """ - Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names (container) - - YANG Description: Container for the list of named SRLGs. - """ - return self.__path_srlgs_names - - def _set_path_srlgs_names(self, v, load=False): - """ - Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_names() directly. - - YANG Description: Container for the list of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_srlgs_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_names(self): - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_disjointness(self): - """ - Getter method for disjointness, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/disjointness (te-path-disjointness) - - YANG Description: The type of resource disjointness. -When configured for a primary path, the disjointness level -applies to all secondary LSPs. When configured for a -secondary path, the disjointness level overrides the level -configured for the primary path. - """ - return self.__disjointness - - def _set_disjointness(self, v, load=False): - """ - Setter method for disjointness, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/disjointness (te-path-disjointness) - If this variable is read-only (config: false) in the - source YANG file, then _set_disjointness is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_disjointness() directly. - - YANG Description: The type of resource disjointness. -When configured for a primary path, the disjointness level -applies to all secondary LSPs. When configured for a -secondary path, the disjointness level overrides the level -configured for the primary path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """disjointness must be of a type compatible with te-path-disjointness""", - 'defined-type': "ietf-te-topology:te-path-disjointness", - 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True)""", - }) - - self.__disjointness = t - if hasattr(self, '_set'): - self._set() - - def _unset_disjointness(self): - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) - - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - link_protection = __builtin__.property(_get_link_protection, _set_link_protection) - setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority) - hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority) - signaling_type = __builtin__.property(_get_signaling_type, _set_signaling_type) - path_metric_bounds = __builtin__.property(_get_path_metric_bounds, _set_path_metric_bounds) - path_affinities_values = __builtin__.property(_get_path_affinities_values, _set_path_affinities_values) - path_affinity_names = __builtin__.property(_get_path_affinity_names, _set_path_affinity_names) - path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists, _set_path_srlgs_lists) - path_srlgs_names = __builtin__.property(_get_path_srlgs_names, _set_path_srlgs_names) - disjointness = __builtin__.property(_get_disjointness, _set_disjointness) - - - _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ('link_protection', link_protection), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('signaling_type', signaling_type), ('path_metric_bounds', path_metric_bounds), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('disjointness', disjointness), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py deleted file mode 100644 index fbd5be189..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinities_value -class path_affinities_values(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-affinities-values. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as values. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) - - _yang_name = 'path-affinities-values' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinities-values'] - - def _get_path_affinities_value(self): - """ - Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinities_value - - def _set_path_affinities_value(self, v, load=False): - """ - Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_value() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_value must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_affinities_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_value(self): - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_affinities_value = __builtin__.property(_get_path_affinities_value, _set_path_affinities_value) - - - _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py deleted file mode 100644 index 8c29e7d9c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_affinities_value(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-affinities-values/path-affinities-value. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) - - _yang_name = 'path-affinities-value' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinities-values', 'path-affinities-value'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) - - YANG Description: The affinity value. The default is empty. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: The affinity value. The default is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with admin-groups""", - 'defined-type': "ietf-te-topology:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - value = __builtin__.property(_get_value, _set_value) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py deleted file mode 100644 index a8540d0a4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinity_name -class path_affinity_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-affinity-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as names. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) - - _yang_name = 'path-affinity-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinity-names'] - - def _get_path_affinity_name(self): - """ - Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinity_name - - def _set_path_affinity_name(self, v, load=False): - """ - Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_name() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_name(self): - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_affinity_name = __builtin__.property(_get_path_affinity_name, _set_path_affinity_name) - - - _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py deleted file mode 100644 index 53d581fd6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import affinity_name -class path_affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-affinity-names/path-affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) - - _yang_name = 'path-affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinity-names', 'path-affinity-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_affinity_name(self): - """ - Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) - - YANG Description: List of named affinities. - """ - return self.__affinity_name - - def _set_affinity_name(self, v, load=False): - """ - Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_affinity_name() directly. - - YANG Description: List of named affinities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_affinity_name(self): - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - affinity_name = __builtin__.property(_get_affinity_name, _set_affinity_name) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py deleted file mode 100644 index 9049a1390..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-affinity-names/path-affinity-name/affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinities. - """ - __slots__ = ('_path_helper', '_extmethods', '__name',) - - _yang_name = 'affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) - - YANG Description: Identifies a named affinity entry. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Identifies a named affinity entry. - """ - 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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - name = __builtin__.property(_get_name, _set_name) - - - _pyangbind_elements = OrderedDict([('name', name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py deleted file mode 100644 index 7f6acfbb0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_metric_bound -class path_metric_bounds(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-metric-bounds. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric bounds container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound',) - - _yang_name = 'path-metric-bounds' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-metric-bounds'] - - def _get_path_metric_bound(self): - """ - Getter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound (list) - - YANG Description: List of TE path metric bounds. - """ - return self.__path_metric_bound - - def _set_path_metric_bound(self, v, load=False): - """ - Setter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric_bound is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric_bound() directly. - - YANG Description: List of TE path metric bounds. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric_bound must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_metric_bound = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric_bound(self): - self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_metric_bound = __builtin__.property(_get_path_metric_bound, _set_path_metric_bound) - - - _pyangbind_elements = OrderedDict([('path_metric_bound', path_metric_bound), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py deleted file mode 100644 index 177598e6c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py +++ /dev/null @@ -1,165 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_metric_bound(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-metric-bounds/path-metric-bound. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of TE path metric bounds. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__upper_bound',) - - _yang_name = 'path-metric-bound' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-metric-bounds', 'path-metric-bound'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) - - YANG Description: Identifies an entry in the list of 'metric-type' items -bound for the TE path. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: Identifies an entry in the list of 'metric-type' items -bound for the TE path. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_upper_bound(self): - """ - Getter method for upper_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) - - YANG Description: Upper bound on the end-to-end TE path metric. A zero -indicates an unbounded upper limit for the specific -'metric-type'. - """ - return self.__upper_bound - - def _set_upper_bound(self, v, load=False): - """ - Setter method for upper_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_upper_bound is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_upper_bound() directly. - - YANG Description: Upper bound on the end-to-end TE path metric. A zero -indicates an unbounded upper limit for the specific -'metric-type'. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """upper_bound must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__upper_bound = t - if hasattr(self, '_set'): - self._set() - - def _unset_upper_bound(self): - self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - - metric_type = __builtin__.property(_get_metric_type, _set_metric_type) - upper_bound = __builtin__.property(_get_upper_bound, _set_upper_bound) - - - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('upper_bound', upper_bound), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py deleted file mode 100644 index 9a345c8ae..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_list -class path_srlgs_lists(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-lists. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path SRLG properties container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) - - _yang_name = 'path-srlgs-lists' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-lists'] - - def _get_path_srlgs_list(self): - """ - Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list (list) - - YANG Description: List of SRLG values to be included or excluded. - """ - return self.__path_srlgs_list - - def _set_path_srlgs_list(self, v, load=False): - """ - Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_list() directly. - - YANG Description: List of SRLG values to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_list must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_srlgs_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_list(self): - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_srlgs_list = __builtin__.property(_get_path_srlgs_list, _set_path_srlgs_list) - - - _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py deleted file mode 100644 index 42bd453b0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_list(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-lists/path-srlgs-list. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of SRLG values to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) - - _yang_name = 'path-srlgs-list' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-lists', 'path-srlgs-list'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_values(self): - """ - Getter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) - - YANG Description: List of SRLG values. - """ - return self.__values - - def _set_values(self, v, load=False): - """ - Setter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_values() directly. - - YANG Description: List of SRLG values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """values must be of a type compatible with srlg""", - 'defined-type': "ietf-te-topology:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True)""", - }) - - self.__values = t - if hasattr(self, '_set'): - self._set() - - def _unset_values(self): - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - values = __builtin__.property(_get_values, _set_values) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py deleted file mode 100644 index 83edd896f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_name -class path_srlgs_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of named SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) - - _yang_name = 'path-srlgs-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-names'] - - def _get_path_srlgs_name(self): - """ - Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name (list) - - YANG Description: List of named SRLGs to be included or excluded. - """ - return self.__path_srlgs_name - - def _set_path_srlgs_name(self, v, load=False): - """ - Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_name() directly. - - YANG Description: List of named SRLGs to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_srlgs_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_name(self): - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_srlgs_name = __builtin__.property(_get_path_srlgs_name, _set_path_srlgs_name) - - - _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py deleted file mode 100644 index 7dba34db6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-names/path-srlgs-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named SRLGs to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) - - _yang_name = 'path-srlgs-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-names', 'path-srlgs-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_names(self): - """ - Getter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/names (string) - - YANG Description: List of named SRLGs. - """ - return self.__names - - def _set_names(self, v, load=False): - """ - Setter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/names (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_names() directly. - - YANG Description: List of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """names must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__names = t - if hasattr(self, '_set'): - self._set() - - def _unset_names(self): - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - names = __builtin__.property(_get_names, _set_names) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py deleted file mode 100644 index f4e10c8b6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py deleted file mode 100644 index a2a8fce28..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - - - def _get_odtu_flex_type(self): - """ - Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -set up along the underlay path of this OTN -connectivity matrix entry. - """ - return self.__odtu_flex_type - - def _set_odtu_flex_type(self, v, load=False): - """ - Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_odtu_flex_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odtu_flex_type() directly. - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -set up along the underlay path of this OTN -connectivity matrix entry. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", - 'defined-type': "l1-types:odtu-flex-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", - }) - - self.__odtu_flex_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odtu_flex_type(self): - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - - odulist = __builtin__.property(_get_odulist, _set_odulist) - odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) - - __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} - _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index 9923938e3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - number = __builtin__.property(_get_number, _set_number) - ts_number = __builtin__.property(_get_ts_number, _set_ts_number) - - __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py deleted file mode 100644 index 32bb9a553..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py +++ /dev/null @@ -1,318 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_metric -from . import path_affinities_values -from . import path_affinity_names -from . import path_srlgs_lists -from . import path_srlgs_names -from . import path_route_objects -class path_properties(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The TE path properties. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_metric','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__path_route_objects',) - - _yang_name = 'path-properties' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties'] - - def _get_path_metric(self): - """ - Getter method for path_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric (list) - - YANG Description: TE path metric type. - """ - return self.__path_metric - - def _set_path_metric(self, v, load=False): - """ - Setter method for path_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric() directly. - - YANG Description: TE path metric type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric(self): - self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_path_affinities_values(self): - """ - Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values (container) - - YANG Description: Path affinities represented as values. - """ - return self.__path_affinities_values - - def _set_path_affinities_values(self, v, load=False): - """ - Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_values() directly. - - YANG Description: Path affinities represented as values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_values must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinities_values = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_values(self): - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_affinity_names(self): - """ - Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names (container) - - YANG Description: Path affinities represented as names. - """ - return self.__path_affinity_names - - def _set_path_affinity_names(self, v, load=False): - """ - Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_names() directly. - - YANG Description: Path affinities represented as names. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinity_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_names(self): - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_lists(self): - """ - Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists (container) - - YANG Description: Path SRLG properties container. - """ - return self.__path_srlgs_lists - - def _set_path_srlgs_lists(self, v, load=False): - """ - Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_lists is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_lists() directly. - - YANG Description: Path SRLG properties container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_lists must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_lists = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_lists(self): - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_names(self): - """ - Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names (container) - - YANG Description: Container for the list of named SRLGs. - """ - return self.__path_srlgs_names - - def _set_path_srlgs_names(self, v, load=False): - """ - Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_names() directly. - - YANG Description: Container for the list of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_names(self): - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_route_objects(self): - """ - Getter method for path_route_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects (container) - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - return self.__path_route_objects - - def _set_path_route_objects(self, v, load=False): - """ - Setter method for path_route_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_route_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_route_objects() directly. - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_route_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_route_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_route_objects(self): - self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - path_metric = __builtin__.property(_get_path_metric) - path_affinities_values = __builtin__.property(_get_path_affinities_values) - path_affinity_names = __builtin__.property(_get_path_affinity_names) - path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) - path_srlgs_names = __builtin__.property(_get_path_srlgs_names) - path_route_objects = __builtin__.property(_get_path_route_objects) - - - _pyangbind_elements = OrderedDict([('path_metric', path_metric), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('path_route_objects', path_route_objects), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py deleted file mode 100644 index a7001481d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinities_value -class path_affinities_values(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-affinities-values. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as values. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) - - _yang_name = 'path-affinities-values' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinities-values'] - - def _get_path_affinities_value(self): - """ - Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinities_value - - def _set_path_affinities_value(self, v, load=False): - """ - Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_value() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_value must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinities_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_value(self): - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinities_value = __builtin__.property(_get_path_affinities_value) - - - _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py deleted file mode 100644 index d762b9990..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_affinities_value(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-affinities-values/path-affinities-value. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) - - _yang_name = 'path-affinities-value' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinities-values', 'path-affinities-value'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/usage (identityref) - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) - - YANG Description: The affinity value. The default is empty. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: The affinity value. The default is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with admin-groups""", - 'defined-type': "ietf-te-topology:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - - usage = __builtin__.property(_get_usage) - value = __builtin__.property(_get_value) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py deleted file mode 100644 index 76beb2d04..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinity_name -class path_affinity_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-affinity-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as names. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) - - _yang_name = 'path-affinity-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinity-names'] - - def _get_path_affinity_name(self): - """ - Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinity_name - - def _set_path_affinity_name(self, v, load=False): - """ - Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_name() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_name(self): - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinity_name = __builtin__.property(_get_path_affinity_name) - - - _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py deleted file mode 100644 index 04f8c534e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import affinity_name -class path_affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-affinity-names/path-affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) - - _yang_name = 'path-affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinity-names', 'path-affinity-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/usage (identityref) - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_affinity_name(self): - """ - Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) - - YANG Description: List of named affinities. - """ - return self.__affinity_name - - def _set_affinity_name(self, v, load=False): - """ - Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_affinity_name() directly. - - YANG Description: List of named affinities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_affinity_name(self): - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - usage = __builtin__.property(_get_usage) - affinity_name = __builtin__.property(_get_affinity_name) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py deleted file mode 100644 index c8ffc5629..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-affinity-names/path-affinity-name/affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinities. - """ - __slots__ = ('_path_helper', '_extmethods', '__name',) - - _yang_name = 'affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) - - YANG Description: Identifies a named affinity entry. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Identifies a named affinity entry. - """ - 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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - name = __builtin__.property(_get_name) - - - _pyangbind_elements = OrderedDict([('name', name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py deleted file mode 100644 index 6bea27715..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py +++ /dev/null @@ -1,159 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_metric(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-metric. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric type. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__accumulative_value',) - - _yang_name = 'path-metric' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-metric'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/metric_type (identityref) - - YANG Description: TE path metric type. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: TE path metric type. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_accumulative_value(self): - """ - Getter method for accumulative_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/accumulative_value (uint64) - - YANG Description: TE path metric accumulative value. - """ - return self.__accumulative_value - - def _set_accumulative_value(self, v, load=False): - """ - Setter method for accumulative_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/accumulative_value (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_accumulative_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_accumulative_value() directly. - - YANG Description: TE path metric accumulative value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """accumulative_value must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__accumulative_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_accumulative_value(self): - self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - - metric_type = __builtin__.property(_get_metric_type) - accumulative_value = __builtin__.property(_get_accumulative_value) - - - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('accumulative_value', accumulative_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py deleted file mode 100644 index fb3b4a46d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_route_object -class path_route_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_route_object',) - - _yang_name = 'path-route-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects'] - - def _get_path_route_object(self): - """ - Getter method for path_route_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object (list) - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - return self.__path_route_object - - def _set_path_route_object(self, v, load=False): - """ - Setter method for path_route_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_route_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_route_object() directly. - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_route_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_route_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_route_object(self): - self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_route_object = __builtin__.property(_get_path_route_object) - - - _pyangbind_elements = OrderedDict([('path_route_object', path_route_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py deleted file mode 100644 index 4fe9aa220..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py +++ /dev/null @@ -1,327 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_route_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-route-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key -values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key -values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - index = __builtin__.property(_get_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py deleted file mode 100644 index 11ddae417..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py deleted file mode 100644 index 7440b8732..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py deleted file mode 100644 index 6fc49cf75..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index d758b2922..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py deleted file mode 100644 index a1a29aebb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py deleted file mode 100644 index 4ca5c4eec..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index 3ec157d35..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py deleted file mode 100644 index e509790c4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_list -class path_srlgs_lists(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-lists. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path SRLG properties container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) - - _yang_name = 'path-srlgs-lists' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-lists'] - - def _get_path_srlgs_list(self): - """ - Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list (list) - - YANG Description: List of SRLG values to be included or excluded. - """ - return self.__path_srlgs_list - - def _set_path_srlgs_list(self, v, load=False): - """ - Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_list() directly. - - YANG Description: List of SRLG values to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_list must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_list(self): - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_list = __builtin__.property(_get_path_srlgs_list) - - - _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py deleted file mode 100644 index 37a85c235..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_list(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-lists/path-srlgs-list. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of SRLG values to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) - - _yang_name = 'path-srlgs-list' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-lists', 'path-srlgs-list'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_values(self): - """ - Getter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) - - YANG Description: List of SRLG values. - """ - return self.__values - - def _set_values(self, v, load=False): - """ - Setter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_values() directly. - - YANG Description: List of SRLG values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """values must be of a type compatible with srlg""", - 'defined-type': "ietf-te-topology:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", - }) - - self.__values = t - if hasattr(self, '_set'): - self._set() - - def _unset_values(self): - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - - usage = __builtin__.property(_get_usage) - values = __builtin__.property(_get_values) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py deleted file mode 100644 index 4e96bae2f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_name -class path_srlgs_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of named SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) - - _yang_name = 'path-srlgs-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-names'] - - def _get_path_srlgs_name(self): - """ - Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name (list) - - YANG Description: List of named SRLGs to be included or excluded. - """ - return self.__path_srlgs_name - - def _set_path_srlgs_name(self, v, load=False): - """ - Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_name() directly. - - YANG Description: List of named SRLGs to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_name(self): - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_name = __builtin__.property(_get_path_srlgs_name) - - - _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py deleted file mode 100644 index ec8734fe0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-names/path-srlgs-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named SRLGs to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) - - _yang_name = 'path-srlgs-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-names', 'path-srlgs-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_names(self): - """ - Getter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/names (string) - - YANG Description: List of named SRLGs. - """ - return self.__names - - def _set_names(self, v, load=False): - """ - Setter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/names (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_names() directly. - - YANG Description: List of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """names must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__names = t - if hasattr(self, '_set'): - self._set() - - def _unset_names(self): - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - usage = __builtin__.property(_get_usage) - names = __builtin__.property(_get_names) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py deleted file mode 100644 index 9fb672458..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py +++ /dev/null @@ -1,155 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restrictions -class to(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Reference to a destination LTP. - """ - __slots__ = ('_path_helper', '_extmethods', '__tp_ref','__label_restrictions',) - - _yang_name = 'to' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to'] - - def _get_tp_ref(self): - """ - Getter method for tp_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/tp_ref (leafref) - - YANG Description: Relative reference to a termination point. - """ - return self.__tp_ref - - def _set_tp_ref(self, v, load=False): - """ - Setter method for tp_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/tp_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tp_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tp_ref() directly. - - YANG Description: Relative reference to a termination point. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tp_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__tp_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_tp_ref(self): - self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_label_restrictions(self): - """ - Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions (container) - - YANG Description: The label restrictions container. - """ - return self.__label_restrictions - - def _set_label_restrictions(self, v, load=False): - """ - Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restrictions is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restrictions() directly. - - YANG Description: The label restrictions container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restrictions must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_restrictions = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restrictions(self): - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - tp_ref = __builtin__.property(_get_tp_ref, _set_tp_ref) - label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) - - - _pyangbind_elements = OrderedDict([('tp_ref', tp_ref), ('label_restrictions', label_restrictions), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py deleted file mode 100644 index 8dfdb0a63..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restriction -class label_restrictions(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The label restrictions container. - """ - __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) - - _yang_name = 'label-restrictions' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions'] - - def _get_label_restriction(self): - """ - Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction (list) - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - return self.__label_restriction - - def _set_label_restriction(self, v, load=False): - """ - Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restriction() directly. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restriction must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__label_restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restriction(self): - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) - - - _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py deleted file mode 100644 index 3b116c4b7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py +++ /dev/null @@ -1,450 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_start -from . import label_end -from . import label_step -from . import otn_label_range -from . import ethernet_label_range -class label_restriction(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) - - _yang_name = 'label-restriction' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction'] - - def _get_restriction(self): - """ - Getter method for restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/restriction (enumeration) - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - return self.__restriction - - def _set_restriction(self, v, load=False): - """ - Setter method for restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/restriction (enumeration) - If this variable is read-only (config: false) in the - source YANG file, then _set_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restriction() directly. - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restriction must be of a type compatible with enumeration""", - 'defined-type': "ietf-te-topology:enumeration", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", - }) - - self.__restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_restriction(self): - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/index (uint32) - - YANG Description: The index of the label restriction list entry. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: The index of the label restriction list entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_label_start(self): - """ - Getter method for label_start, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start (container) - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - return self.__label_start - - def _set_label_start(self, v, load=False): - """ - Setter method for label_start, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_start is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_start() directly. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_start must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_start = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_start(self): - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_end(self): - """ - Getter method for label_end, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end (container) - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - return self.__label_end - - def _set_label_end(self, v, load=False): - """ - Setter method for label_end, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_end is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_end() directly. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_end must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_end = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_end(self): - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_step(self): - """ - Getter method for label_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step (container) - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - return self.__label_step - - def _set_label_step(self, v, load=False): - """ - Setter method for label_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_step() directly. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_step must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_step(self): - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_range_bitmap(self): - """ - Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - return self.__range_bitmap - - def _set_range_bitmap(self, v, load=False): - """ - Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_bitmap is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_bitmap() directly. - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", - 'defined-type': "yang:hex-string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", - }) - - self.__range_bitmap = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_bitmap(self): - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - - - def _get_otn_label_range(self): - """ - Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range (container) - - YANG Description: Label range information for OTN. - """ - return self.__otn_label_range - - def _set_otn_label_range(self, v, load=False): - """ - Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn_label_range() directly. - - YANG Description: Label range information for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn_label_range(self): - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_ethernet_label_range(self): - """ - Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range (container) - - YANG Description: Ethernet-specific label range related information. - """ - return self.__ethernet_label_range - - def _set_ethernet_label_range(self, v, load=False): - """ - Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_ethernet_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ethernet_label_range() directly. - - YANG Description: Ethernet-specific label range related information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ethernet_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__ethernet_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_ethernet_label_range(self): - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - restriction = __builtin__.property(_get_restriction, _set_restriction) - index = __builtin__.property(_get_index, _set_index) - label_start = __builtin__.property(_get_label_start, _set_label_start) - label_end = __builtin__.property(_get_label_end, _set_label_end) - label_step = __builtin__.property(_get_label_step, _set_label_step) - range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) - otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) - ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) - - - _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py deleted file mode 100644 index c9f4959da..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ethernet_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/ethernet-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Ethernet-specific label range related information. - """ - __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) - - _yang_name = 'ethernet-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] - - def _get_tag_type(self): - """ - Getter method for tag_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - - YANG Description: VLAN tag type. - """ - return self.__tag_type - - def _set_tag_type(self, v, load=False): - """ - Setter method for tag_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_tag_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tag_type() directly. - - YANG Description: VLAN tag type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", - 'defined-type': "etht-types:eth-tag-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", - }) - - self.__tag_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tag_type(self): - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - - YANG Description: priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - - tag_type = __builtin__.property(_get_tag_type, _set_tag_type) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py deleted file mode 100644 index c5f363333..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_end(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-end. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-end' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-end'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py deleted file mode 100644 index 09a0f03ed..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-end/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py deleted file mode 100644 index 74637ab69..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py deleted file mode 100644 index 55e8ab30e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_start(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-start. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-start' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-start'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py deleted file mode 100644 index c2477e817..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-start/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py deleted file mode 100644 index cbb3ec616..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py deleted file mode 100644 index 570cd69b5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class label_step(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-step. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) - - _yang_name = 'label-step' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-step'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/generic (int32) - - YANG Description: Label range step. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/generic (int32) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Label range step. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with int32""", - 'defined-type': "int32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn (container) - - YANG Description: Label step for OTN - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label step for OTN - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_step(self): - """ - Getter method for eth_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/eth_step (uint16) - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - return self.__eth_step - - def _set_eth_step(self, v, load=False): - """ - Setter method for eth_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/eth_step (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_step() directly. - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_step must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", - }) - - self.__eth_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_step(self): - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_step = __builtin__.property(_get_eth_step, _set_eth_step) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py deleted file mode 100644 index 541e34252..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-step/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label step for OTN - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py deleted file mode 100644 index 2cae8d9a9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py +++ /dev/null @@ -1,256 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/otn-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label range information for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) - - _yang_name = 'otn-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'otn-label-range'] - - def _get_range_type(self): - """ - Getter method for range_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - return self.__range_type - - def _set_range_type(self, v, load=False): - """ - Setter method for range_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_type() directly. - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_type must be of a type compatible with otn-label-range-type""", - 'defined-type': "ietf-otn-topology:otn-label-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", - }) - - self.__range_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_type(self): - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_odu_type_list(self): - """ - Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - return self.__odu_type_list - - def _set_odu_type_list(self, v, load=False): - """ - Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type_list() directly. - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type_list must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type_list(self): - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/priority (uint8) - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - - range_type = __builtin__.property(_get_range_type, _set_range_type) - tsg = __builtin__.property(_get_tsg, _set_tsg) - odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py deleted file mode 100644 index 29a2ea0fd..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py +++ /dev/null @@ -1,326 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import primary_path -from . import backup_path -from . import tunnel_termination_points -from . import tunnels -class underlay(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Attributes of the TE link underlay. - """ - __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) - - _yang_name = 'underlay' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay'] - - def _get_enabled(self): - """ - Getter method for enabled, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/enabled (boolean) - - YANG Description: 'true' if the underlay is enabled. -'false' if the underlay is disabled. - """ - return self.__enabled - - def _set_enabled(self, v, load=False): - """ - Setter method for enabled, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/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: 'true' if the underlay is enabled. -'false' if the underlay is 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_primary_path(self): - """ - Getter method for primary_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path (container) - - YANG Description: The service path on the underlay topology that -supports this link. - """ - return self.__primary_path - - def _set_primary_path(self, v, load=False): - """ - Setter method for primary_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_primary_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_primary_path() directly. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """primary_path must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__primary_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_primary_path(self): - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_backup_path(self): - """ - Getter method for backup_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path (list) - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - return self.__backup_path - - def _set_backup_path(self, v, load=False): - """ - Setter method for backup_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_backup_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_backup_path() directly. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """backup_path must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__backup_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_backup_path(self): - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_protection_type(self): - """ - Getter method for protection_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/protection_type (identityref) - - YANG Description: Underlay protection type desired for this link. - """ - return self.__protection_type - - def _set_protection_type(self, v, load=False): - """ - Setter method for protection_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/protection_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_protection_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_protection_type() directly. - - YANG Description: Underlay protection type desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """protection_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__protection_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_protection_type(self): - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_tunnel_termination_points(self): - """ - Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points (container) - - YANG Description: Underlay TTPs desired for this link. - """ - return self.__tunnel_termination_points - - def _set_tunnel_termination_points(self, v, load=False): - """ - Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_termination_points is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_termination_points() directly. - - YANG Description: Underlay TTPs desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_termination_points must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tunnel_termination_points = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_termination_points(self): - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_tunnels(self): - """ - Getter method for tunnels, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels (container) - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - return self.__tunnels - - def _set_tunnels(self, v, load=False): - """ - Setter method for tunnels, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnels is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnels() directly. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnels must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tunnels = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnels(self): - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - enabled = __builtin__.property(_get_enabled, _set_enabled) - primary_path = __builtin__.property(_get_primary_path, _set_primary_path) - backup_path = __builtin__.property(_get_backup_path, _set_backup_path) - protection_type = __builtin__.property(_get_protection_type, _set_protection_type) - tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points, _set_tunnel_termination_points) - tunnels = __builtin__.property(_get_tunnels, _set_tunnels) - - - _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py deleted file mode 100644 index 408b97bc6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py +++ /dev/null @@ -1,207 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class backup_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) - - _yang_name = 'backup-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/index (uint32) - - YANG Description: A sequence number to identify a backup path. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: A sequence number to identify a backup path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element (list) - - YANG Description: A list of path elements describing the backup service -path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the backup service -path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - path_element = __builtin__.property(_get_path_element, _set_path_element) - - - _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py deleted file mode 100644 index 53ca0bce5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py +++ /dev/null @@ -1,321 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the backup service -path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index b0ecb1150..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py deleted file mode 100644 index cbd8c31c1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index 3b1310552..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 92e4b3b20..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index ee5484d4d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index f2167210d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index 2d48ba9d7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py deleted file mode 100644 index f2bbc86b5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class primary_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) - - _yang_name = 'primary-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element (list) - - YANG Description: A list of path elements describing the service path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the service path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - path_element = __builtin__.property(_get_path_element, _set_path_element) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py deleted file mode 100644 index fa22d7bbd..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py +++ /dev/null @@ -1,320 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the service path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index 5bf46184c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py deleted file mode 100644 index 6377790bb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index c200f5dae..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 7f897420e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index e1c306281..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index 9c043b272..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index 4f8f2de6e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py deleted file mode 100644 index 6fbb783c1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel_termination_points(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/tunnel-termination-points. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TTPs desired for this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) - - _yang_name = 'tunnel-termination-points' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'tunnel-termination-points'] - - def _get_source(self): - """ - Getter method for source, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/source (binary) - - YANG Description: Source TTP identifier. - """ - return self.__source - - def _set_source(self, v, load=False): - """ - Setter method for source, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/source (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_source is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_source() directly. - - YANG Description: Source TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """source must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__source = t - if hasattr(self, '_set'): - self._set() - - def _unset_source(self): - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - - def _get_destination(self): - """ - Getter method for destination, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/destination (binary) - - YANG Description: Destination TTP identifier. - """ - return self.__destination - - def _set_destination(self, v, load=False): - """ - Setter method for destination, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/destination (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_destination is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_destination() directly. - - YANG Description: Destination TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """destination must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__destination = t - if hasattr(self, '_set'): - self._set() - - def _unset_destination(self): - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - source = __builtin__.property(_get_source, _set_source) - destination = __builtin__.property(_get_destination, _set_destination) - - - _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py deleted file mode 100644 index f5455155f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py +++ /dev/null @@ -1,167 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tunnel -class tunnels(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/tunnels. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) - - _yang_name = 'tunnels' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'tunnels'] - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_tunnel(self): - """ - Getter method for tunnel, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel (list) - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - return self.__tunnel - - def _set_tunnel(self, v, load=False): - """ - Setter method for tunnel, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel() directly. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__tunnel = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel(self): - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - sharing = __builtin__.property(_get_sharing, _set_sharing) - tunnel = __builtin__.property(_get_tunnel, _set_tunnel) - - - _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py deleted file mode 100644 index 58c254b1e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py +++ /dev/null @@ -1,170 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/tunnels/tunnel. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) - - _yang_name = 'tunnel' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'tunnels', 'tunnel'] - - def _get_tunnel_name(self): - """ - Getter method for tunnel_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/tunnel_name (string) - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - return self.__tunnel_name - - def _set_tunnel_name(self, v, load=False): - """ - Setter method for tunnel_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/tunnel_name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_name() directly. - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - 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=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__tunnel_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_name(self): - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - tunnel_name = __builtin__.property(_get_tunnel_name, _set_tunnel_name) - sharing = __builtin__.property(_get_sharing, _set_sharing) - - - _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py deleted file mode 100644 index c5a9838d5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restriction -class label_restrictions(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The label restrictions container. - """ - __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) - - _yang_name = 'label-restrictions' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions'] - - def _get_label_restriction(self): - """ - Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction (list) - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - return self.__label_restriction - - def _set_label_restriction(self, v, load=False): - """ - Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restriction() directly. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restriction must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__label_restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restriction(self): - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) - - - _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py deleted file mode 100644 index 1d5b18963..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py +++ /dev/null @@ -1,450 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_start -from . import label_end -from . import label_step -from . import otn_label_range -from . import ethernet_label_range -class label_restriction(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) - - _yang_name = 'label-restriction' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction'] - - def _get_restriction(self): - """ - Getter method for restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/restriction (enumeration) - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - return self.__restriction - - def _set_restriction(self, v, load=False): - """ - Setter method for restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/restriction (enumeration) - If this variable is read-only (config: false) in the - source YANG file, then _set_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restriction() directly. - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restriction must be of a type compatible with enumeration""", - 'defined-type': "ietf-te-topology:enumeration", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", - }) - - self.__restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_restriction(self): - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/index (uint32) - - YANG Description: The index of the label restriction list entry. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: The index of the label restriction list entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_label_start(self): - """ - Getter method for label_start, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start (container) - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - return self.__label_start - - def _set_label_start(self, v, load=False): - """ - Setter method for label_start, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_start is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_start() directly. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_start must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_start = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_start(self): - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_end(self): - """ - Getter method for label_end, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end (container) - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - return self.__label_end - - def _set_label_end(self, v, load=False): - """ - Setter method for label_end, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_end is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_end() directly. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_end must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_end = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_end(self): - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_step(self): - """ - Getter method for label_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step (container) - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - return self.__label_step - - def _set_label_step(self, v, load=False): - """ - Setter method for label_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_step() directly. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_step must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_step(self): - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_range_bitmap(self): - """ - Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - return self.__range_bitmap - - def _set_range_bitmap(self, v, load=False): - """ - Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_bitmap is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_bitmap() directly. - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", - 'defined-type': "yang:hex-string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", - }) - - self.__range_bitmap = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_bitmap(self): - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - - - def _get_otn_label_range(self): - """ - Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range (container) - - YANG Description: Label range information for OTN. - """ - return self.__otn_label_range - - def _set_otn_label_range(self, v, load=False): - """ - Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn_label_range() directly. - - YANG Description: Label range information for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn_label_range(self): - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_ethernet_label_range(self): - """ - Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range (container) - - YANG Description: Ethernet-specific label range related information. - """ - return self.__ethernet_label_range - - def _set_ethernet_label_range(self, v, load=False): - """ - Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_ethernet_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ethernet_label_range() directly. - - YANG Description: Ethernet-specific label range related information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ethernet_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__ethernet_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_ethernet_label_range(self): - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - restriction = __builtin__.property(_get_restriction, _set_restriction) - index = __builtin__.property(_get_index, _set_index) - label_start = __builtin__.property(_get_label_start, _set_label_start) - label_end = __builtin__.property(_get_label_end, _set_label_end) - label_step = __builtin__.property(_get_label_step, _set_label_step) - range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) - otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) - ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) - - - _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py deleted file mode 100644 index 120438948..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ethernet_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/ethernet-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Ethernet-specific label range related information. - """ - __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) - - _yang_name = 'ethernet-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] - - def _get_tag_type(self): - """ - Getter method for tag_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - - YANG Description: VLAN tag type. - """ - return self.__tag_type - - def _set_tag_type(self, v, load=False): - """ - Setter method for tag_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_tag_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tag_type() directly. - - YANG Description: VLAN tag type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", - 'defined-type': "etht-types:eth-tag-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", - }) - - self.__tag_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tag_type(self): - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - - YANG Description: priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - - tag_type = __builtin__.property(_get_tag_type, _set_tag_type) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py deleted file mode 100644 index 9986d6a93..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_end(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-end. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-end' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-end'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py deleted file mode 100644 index 29e0c9a99..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-end/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py deleted file mode 100644 index 1970e3999..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py deleted file mode 100644 index 5d88a1763..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_start(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-start. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-start' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-start'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py deleted file mode 100644 index 3a96742a0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-start/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py deleted file mode 100644 index 8dede38f3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py deleted file mode 100644 index 6fefc3147..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class label_step(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-step. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) - - _yang_name = 'label-step' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-step'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/generic (int32) - - YANG Description: Label range step. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/generic (int32) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Label range step. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with int32""", - 'defined-type': "int32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn (container) - - YANG Description: Label step for OTN - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label step for OTN - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_step(self): - """ - Getter method for eth_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/eth_step (uint16) - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - return self.__eth_step - - def _set_eth_step(self, v, load=False): - """ - Setter method for eth_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/eth_step (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_step() directly. - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_step must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", - }) - - self.__eth_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_step(self): - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_step = __builtin__.property(_get_eth_step, _set_eth_step) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py deleted file mode 100644 index a14b27f40..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-step/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label step for OTN - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py deleted file mode 100644 index 734a4997e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py +++ /dev/null @@ -1,256 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/otn-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label range information for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) - - _yang_name = 'otn-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'otn-label-range'] - - def _get_range_type(self): - """ - Getter method for range_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - return self.__range_type - - def _set_range_type(self, v, load=False): - """ - Setter method for range_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_type() directly. - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_type must be of a type compatible with otn-label-range-type""", - 'defined-type': "ietf-otn-topology:otn-label-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", - }) - - self.__range_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_type(self): - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_odu_type_list(self): - """ - Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - return self.__odu_type_list - - def _set_odu_type_list(self, v, load=False): - """ - Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type_list() directly. - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type_list must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type_list(self): - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/priority (uint8) - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - - range_type = __builtin__.property(_get_range_type, _set_range_type) - tsg = __builtin__.property(_get_tsg, _set_tsg) - odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py deleted file mode 100644 index a38eef90a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py +++ /dev/null @@ -1,199 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import optimization_metric -from . import tiebreakers -from . import objective_function -class optimizations(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - __slots__ = ('_path_helper', '_extmethods', '__optimization_metric','__tiebreakers','__objective_function',) - - _yang_name = 'optimizations' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations'] - - def _get_optimization_metric(self): - """ - Getter method for optimization_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric (list) - - YANG Description: TE path metric type. - """ - return self.__optimization_metric - - def _set_optimization_metric(self, v, load=False): - """ - Setter method for optimization_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_optimization_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_optimization_metric() directly. - - YANG Description: TE path metric type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """optimization_metric must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__optimization_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_optimization_metric(self): - self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_tiebreakers(self): - """ - Getter method for tiebreakers, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers (container) - - YANG Description: Container for the list of tiebreakers. - """ - return self.__tiebreakers - - def _set_tiebreakers(self, v, load=False): - """ - Setter method for tiebreakers, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreakers is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreakers() directly. - - YANG Description: Container for the list of tiebreakers. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreakers must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tiebreakers = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreakers(self): - self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_objective_function(self): - """ - Getter method for objective_function, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function (container) - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - return self.__objective_function - - def _set_objective_function(self, v, load=False): - """ - Setter method for objective_function, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_objective_function is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_objective_function() directly. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """objective_function must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__objective_function = t - if hasattr(self, '_set'): - self._set() - - def _unset_objective_function(self): - self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - optimization_metric = __builtin__.property(_get_optimization_metric, _set_optimization_metric) - tiebreakers = __builtin__.property(_get_tiebreakers, _set_tiebreakers) - objective_function = __builtin__.property(_get_objective_function, _set_objective_function) - - __choices__ = {'algorithm': {'metric': ['optimization_metric', 'tiebreakers'], 'objective-function': ['objective_function']}} - _pyangbind_elements = OrderedDict([('optimization_metric', optimization_metric), ('tiebreakers', tiebreakers), ('objective_function', objective_function), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/__init__.py deleted file mode 100644 index 3938cadf9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class objective_function(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/objective-function. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - __slots__ = ('_path_helper', '_extmethods', '__objective_function_type',) - - _yang_name = 'objective-function' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'objective-function'] - - def _get_objective_function_type(self): - """ - Getter method for objective_function_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/objective_function_type (identityref) - - YANG Description: Objective function entry. - """ - return self.__objective_function_type - - def _set_objective_function_type(self, v, load=False): - """ - Setter method for objective_function_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/objective_function_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_objective_function_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_objective_function_type() directly. - - YANG Description: Objective function entry. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """objective_function_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__objective_function_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_objective_function_type(self): - self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - objective_function_type = __builtin__.property(_get_objective_function_type, _set_objective_function_type) - - __choices__ = {'algorithm': {'objective-function': ['objective_function_type']}} - _pyangbind_elements = OrderedDict([('objective_function_type', objective_function_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/__init__.py deleted file mode 100644 index 8594a8e95..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/__init__.py +++ /dev/null @@ -1,241 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import explicit_route_exclude_objects -from . import explicit_route_include_objects -class optimization_metric(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric type. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__weight','__explicit_route_exclude_objects','__explicit_route_include_objects',) - - _yang_name = 'optimization-metric' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/metric_type (identityref) - - YANG Description: Identifies the 'metric-type' that the path computation -process uses for optimization. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: Identifies the 'metric-type' that the path computation -process uses for optimization. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_weight(self): - """ - Getter method for weight, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/weight (uint8) - - YANG Description: TE path metric normalization weight. - """ - return self.__weight - - def _set_weight(self, v, load=False): - """ - Setter method for weight, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/weight (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_weight is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_weight() directly. - - YANG Description: TE path metric normalization weight. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """weight must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__weight = t - if hasattr(self, '_set'): - self._set() - - def _unset_weight(self): - self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_explicit_route_exclude_objects(self): - """ - Getter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects (container) - - YANG Description: Container for the 'exclude route' object list. - """ - return self.__explicit_route_exclude_objects - - def _set_explicit_route_exclude_objects(self, v, load=False): - """ - Setter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_explicit_route_exclude_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_explicit_route_exclude_objects() directly. - - YANG Description: Container for the 'exclude route' object list. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """explicit_route_exclude_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__explicit_route_exclude_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_explicit_route_exclude_objects(self): - self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_explicit_route_include_objects(self): - """ - Getter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects (container) - - YANG Description: Container for the 'include route' object list. - """ - return self.__explicit_route_include_objects - - def _set_explicit_route_include_objects(self, v, load=False): - """ - Setter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_explicit_route_include_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_explicit_route_include_objects() directly. - - YANG Description: Container for the 'include route' object list. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """explicit_route_include_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__explicit_route_include_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_explicit_route_include_objects(self): - self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - metric_type = __builtin__.property(_get_metric_type, _set_metric_type) - weight = __builtin__.property(_get_weight, _set_weight) - explicit_route_exclude_objects = __builtin__.property(_get_explicit_route_exclude_objects, _set_explicit_route_exclude_objects) - explicit_route_include_objects = __builtin__.property(_get_explicit_route_include_objects, _set_explicit_route_include_objects) - - __choices__ = {'algorithm': {'metric': ['metric_type', 'weight', 'explicit_route_exclude_objects', 'explicit_route_include_objects']}} - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('weight', weight), ('explicit_route_exclude_objects', explicit_route_exclude_objects), ('explicit_route_include_objects', explicit_route_include_objects), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py deleted file mode 100644 index d96148db3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import route_object_exclude_object -class explicit_route_exclude_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the 'exclude route' object list. - """ - __slots__ = ('_path_helper', '_extmethods', '__route_object_exclude_object',) - - _yang_name = 'explicit-route-exclude-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects'] - - def _get_route_object_exclude_object(self): - """ - Getter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - return self.__route_object_exclude_object - - def _set_route_object_exclude_object(self, v, load=False): - """ - Setter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_route_object_exclude_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_route_object_exclude_object() directly. - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """route_object_exclude_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__route_object_exclude_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_route_object_exclude_object(self): - self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - route_object_exclude_object = __builtin__.property(_get_route_object_exclude_object, _set_route_object_exclude_object) - - __choices__ = {'algorithm': {'metric': ['route_object_exclude_object']}} - _pyangbind_elements = OrderedDict([('route_object_exclude_object', route_object_exclude_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py deleted file mode 100644 index be837bdc1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py +++ /dev/null @@ -1,365 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -from . import srlg -class route_object_exclude_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop','__srlg',) - - _yang_name = 'route-object-exclude-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_srlg(self): - """ - Getter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) - - YANG Description: SRLG container. - """ - return self.__srlg - - def _set_srlg(self, v, load=False): - """ - Setter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_srlg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_srlg() directly. - - YANG Description: SRLG container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """srlg must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__srlg = t - if hasattr(self, '_set'): - self._set() - - def _unset_srlg(self): - self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - srlg = __builtin__.property(_get_srlg, _set_srlg) - - __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop'], 'srlg': ['srlg']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ('srlg', srlg), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py deleted file mode 100644 index 1e6791351..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py deleted file mode 100644 index 50003dc6a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py deleted file mode 100644 index b80329a9f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 56737e865..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py deleted file mode 100644 index c91d34b8b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py deleted file mode 100644 index e9805bcdf..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py deleted file mode 100644 index c5c2961e6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py +++ /dev/null @@ -1,115 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class srlg(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/srlg. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: SRLG container. - """ - __slots__ = ('_path_helper', '_extmethods', '__srlg',) - - _yang_name = 'srlg' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'srlg'] - - def _get_srlg(self): - """ - Getter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) - - YANG Description: SRLG value. - """ - return self.__srlg - - def _set_srlg(self, v, load=False): - """ - Setter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_srlg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_srlg() directly. - - YANG Description: SRLG value. - """ - 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="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """srlg 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="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__srlg = t - if hasattr(self, '_set'): - self._set() - - def _unset_srlg(self): - self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - srlg = __builtin__.property(_get_srlg, _set_srlg) - - __choices__ = {'type': {'srlg': ['srlg']}} - _pyangbind_elements = OrderedDict([('srlg', srlg), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index 4a5b91f1c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py deleted file mode 100644 index 52d91329d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import route_object_include_object -class explicit_route_include_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the 'include route' object list. - """ - __slots__ = ('_path_helper', '_extmethods', '__route_object_include_object',) - - _yang_name = 'explicit-route-include-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects'] - - def _get_route_object_include_object(self): - """ - Getter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - return self.__route_object_include_object - - def _set_route_object_include_object(self, v, load=False): - """ - Setter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_route_object_include_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_route_object_include_object() directly. - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """route_object_include_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__route_object_include_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_route_object_include_object(self): - self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - route_object_include_object = __builtin__.property(_get_route_object_include_object, _set_route_object_include_object) - - __choices__ = {'algorithm': {'metric': ['route_object_include_object']}} - _pyangbind_elements = OrderedDict([('route_object_include_object', route_object_include_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py deleted file mode 100644 index 4b596318d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py +++ /dev/null @@ -1,325 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class route_object_include_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'route-object-include-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py deleted file mode 100644 index 005900b6d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py deleted file mode 100644 index cec600652..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py deleted file mode 100644 index 5212e8f5d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index de434357d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py deleted file mode 100644 index a4d2fdce1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py deleted file mode 100644 index d5f6b873c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index b3cc0d8de..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/__init__.py deleted file mode 100644 index 1132534b5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tiebreaker -class tiebreakers(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/tiebreakers. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of tiebreakers. - """ - __slots__ = ('_path_helper', '_extmethods', '__tiebreaker',) - - _yang_name = 'tiebreakers' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'tiebreakers'] - - def _get_tiebreaker(self): - """ - Getter method for tiebreaker, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker (list) - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - return self.__tiebreaker - - def _set_tiebreaker(self, v, load=False): - """ - Setter method for tiebreaker, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreaker is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreaker() directly. - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreaker must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__tiebreaker = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreaker(self): - self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - tiebreaker = __builtin__.property(_get_tiebreaker, _set_tiebreaker) - - __choices__ = {'algorithm': {'metric': ['tiebreaker']}} - _pyangbind_elements = OrderedDict([('tiebreaker', tiebreaker), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py deleted file mode 100644 index 41f4df7a2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py +++ /dev/null @@ -1,122 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tiebreaker(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/tiebreakers/tiebreaker. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - __slots__ = ('_path_helper', '_extmethods', '__tiebreaker_type',) - - _yang_name = 'tiebreaker' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'tiebreakers', 'tiebreaker'] - - def _get_tiebreaker_type(self): - """ - Getter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) - - YANG Description: Identifies an entry in the list of tiebreakers. - """ - return self.__tiebreaker_type - - def _set_tiebreaker_type(self, v, load=False): - """ - Setter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreaker_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreaker_type() directly. - - YANG Description: Identifies an entry in the list of tiebreakers. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreaker_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tiebreaker_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreaker_type(self): - self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - tiebreaker_type = __builtin__.property(_get_tiebreaker_type, _set_tiebreaker_type) - - __choices__ = {'algorithm': {'metric': ['tiebreaker_type']}} - _pyangbind_elements = OrderedDict([('tiebreaker_type', tiebreaker_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py deleted file mode 100644 index f8f93bf02..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py +++ /dev/null @@ -1,523 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -from . import path_metric_bounds -from . import path_affinities_values -from . import path_affinity_names -from . import path_srlgs_lists -from . import path_srlgs_names -class path_constraints(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE named path constraints container. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth','__link_protection','__setup_priority','__hold_priority','__signaling_type','__path_metric_bounds','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__disjointness',) - - _yang_name = 'path-constraints' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints'] - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_link_protection(self): - """ - Getter method for link_protection, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/link_protection (identityref) - - YANG Description: Link protection type required for the links included -in the computed path. - """ - return self.__link_protection - - def _set_link_protection(self, v, load=False): - """ - Setter method for link_protection, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/link_protection (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_protection is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_protection() directly. - - YANG Description: Link protection type required for the links included -in the computed path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_protection must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__link_protection = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_protection(self): - self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_setup_priority(self): - """ - Getter method for setup_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/setup_priority (uint8) - - YANG Description: TE LSP requested setup priority. - """ - return self.__setup_priority - - def _set_setup_priority(self, v, load=False): - """ - Setter method for setup_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/setup_priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_setup_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_setup_priority() directly. - - YANG Description: TE LSP requested setup priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """setup_priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__setup_priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_setup_priority(self): - self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_hold_priority(self): - """ - Getter method for hold_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/hold_priority (uint8) - - YANG Description: TE LSP requested hold priority. - """ - return self.__hold_priority - - def _set_hold_priority(self, v, load=False): - """ - Setter method for hold_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/hold_priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_hold_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hold_priority() directly. - - YANG Description: TE LSP requested hold priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hold_priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__hold_priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_hold_priority(self): - self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_signaling_type(self): - """ - Getter method for signaling_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/signaling_type (identityref) - - YANG Description: TE tunnel path signaling type. - """ - return self.__signaling_type - - def _set_signaling_type(self, v, load=False): - """ - Setter method for signaling_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/signaling_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_signaling_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_signaling_type() directly. - - YANG Description: TE tunnel path signaling type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """signaling_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__signaling_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_signaling_type(self): - self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_path_metric_bounds(self): - """ - Getter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds (container) - - YANG Description: TE path metric bounds container. - """ - return self.__path_metric_bounds - - def _set_path_metric_bounds(self, v, load=False): - """ - Setter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric_bounds is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric_bounds() directly. - - YANG Description: TE path metric bounds container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric_bounds must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_metric_bounds = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric_bounds(self): - self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_affinities_values(self): - """ - Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values (container) - - YANG Description: Path affinities represented as values. - """ - return self.__path_affinities_values - - def _set_path_affinities_values(self, v, load=False): - """ - Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_values() directly. - - YANG Description: Path affinities represented as values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_values must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_affinities_values = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_values(self): - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_affinity_names(self): - """ - Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names (container) - - YANG Description: Path affinities represented as names. - """ - return self.__path_affinity_names - - def _set_path_affinity_names(self, v, load=False): - """ - Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_names() directly. - - YANG Description: Path affinities represented as names. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_affinity_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_names(self): - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_srlgs_lists(self): - """ - Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists (container) - - YANG Description: Path SRLG properties container. - """ - return self.__path_srlgs_lists - - def _set_path_srlgs_lists(self, v, load=False): - """ - Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_lists is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_lists() directly. - - YANG Description: Path SRLG properties container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_lists must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_srlgs_lists = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_lists(self): - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_srlgs_names(self): - """ - Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names (container) - - YANG Description: Container for the list of named SRLGs. - """ - return self.__path_srlgs_names - - def _set_path_srlgs_names(self, v, load=False): - """ - Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_names() directly. - - YANG Description: Container for the list of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_srlgs_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_names(self): - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_disjointness(self): - """ - Getter method for disjointness, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/disjointness (te-path-disjointness) - - YANG Description: The type of resource disjointness. -When configured for a primary path, the disjointness level -applies to all secondary LSPs. When configured for a -secondary path, the disjointness level overrides the level -configured for the primary path. - """ - return self.__disjointness - - def _set_disjointness(self, v, load=False): - """ - Setter method for disjointness, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/disjointness (te-path-disjointness) - If this variable is read-only (config: false) in the - source YANG file, then _set_disjointness is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_disjointness() directly. - - YANG Description: The type of resource disjointness. -When configured for a primary path, the disjointness level -applies to all secondary LSPs. When configured for a -secondary path, the disjointness level overrides the level -configured for the primary path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """disjointness must be of a type compatible with te-path-disjointness""", - 'defined-type': "ietf-te-topology:te-path-disjointness", - 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True)""", - }) - - self.__disjointness = t - if hasattr(self, '_set'): - self._set() - - def _unset_disjointness(self): - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) - - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - link_protection = __builtin__.property(_get_link_protection, _set_link_protection) - setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority) - hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority) - signaling_type = __builtin__.property(_get_signaling_type, _set_signaling_type) - path_metric_bounds = __builtin__.property(_get_path_metric_bounds, _set_path_metric_bounds) - path_affinities_values = __builtin__.property(_get_path_affinities_values, _set_path_affinities_values) - path_affinity_names = __builtin__.property(_get_path_affinity_names, _set_path_affinity_names) - path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists, _set_path_srlgs_lists) - path_srlgs_names = __builtin__.property(_get_path_srlgs_names, _set_path_srlgs_names) - disjointness = __builtin__.property(_get_disjointness, _set_disjointness) - - - _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ('link_protection', link_protection), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('signaling_type', signaling_type), ('path_metric_bounds', path_metric_bounds), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('disjointness', disjointness), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py deleted file mode 100644 index b04586e5a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinities_value -class path_affinities_values(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-affinities-values. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as values. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) - - _yang_name = 'path-affinities-values' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-affinities-values'] - - def _get_path_affinities_value(self): - """ - Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinities_value - - def _set_path_affinities_value(self, v, load=False): - """ - Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_value() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_value must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_affinities_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_value(self): - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_affinities_value = __builtin__.property(_get_path_affinities_value, _set_path_affinities_value) - - - _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py deleted file mode 100644 index d4347e12e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_affinities_value(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-affinities-values/path-affinities-value. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) - - _yang_name = 'path-affinities-value' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-affinities-values', 'path-affinities-value'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) - - YANG Description: The affinity value. The default is empty. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: The affinity value. The default is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with admin-groups""", - 'defined-type': "ietf-te-topology:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - value = __builtin__.property(_get_value, _set_value) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py deleted file mode 100644 index d9511703b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinity_name -class path_affinity_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-affinity-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as names. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) - - _yang_name = 'path-affinity-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-affinity-names'] - - def _get_path_affinity_name(self): - """ - Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinity_name - - def _set_path_affinity_name(self, v, load=False): - """ - Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_name() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_name(self): - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_affinity_name = __builtin__.property(_get_path_affinity_name, _set_path_affinity_name) - - - _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py deleted file mode 100644 index 5bea16d3c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import affinity_name -class path_affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-affinity-names/path-affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) - - _yang_name = 'path-affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-affinity-names', 'path-affinity-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_affinity_name(self): - """ - Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) - - YANG Description: List of named affinities. - """ - return self.__affinity_name - - def _set_affinity_name(self, v, load=False): - """ - Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_affinity_name() directly. - - YANG Description: List of named affinities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_affinity_name(self): - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - affinity_name = __builtin__.property(_get_affinity_name, _set_affinity_name) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py deleted file mode 100644 index 27b87f524..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-affinity-names/path-affinity-name/affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinities. - """ - __slots__ = ('_path_helper', '_extmethods', '__name',) - - _yang_name = 'affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) - - YANG Description: Identifies a named affinity entry. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Identifies a named affinity entry. - """ - 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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - name = __builtin__.property(_get_name, _set_name) - - - _pyangbind_elements = OrderedDict([('name', name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py deleted file mode 100644 index 89e9dcde5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_metric_bound -class path_metric_bounds(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-metric-bounds. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric bounds container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound',) - - _yang_name = 'path-metric-bounds' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-metric-bounds'] - - def _get_path_metric_bound(self): - """ - Getter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound (list) - - YANG Description: List of TE path metric bounds. - """ - return self.__path_metric_bound - - def _set_path_metric_bound(self, v, load=False): - """ - Setter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric_bound is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric_bound() directly. - - YANG Description: List of TE path metric bounds. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric_bound must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_metric_bound = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric_bound(self): - self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_metric_bound = __builtin__.property(_get_path_metric_bound, _set_path_metric_bound) - - - _pyangbind_elements = OrderedDict([('path_metric_bound', path_metric_bound), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py deleted file mode 100644 index 9e967408a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py +++ /dev/null @@ -1,165 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_metric_bound(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-metric-bounds/path-metric-bound. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of TE path metric bounds. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__upper_bound',) - - _yang_name = 'path-metric-bound' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-metric-bounds', 'path-metric-bound'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) - - YANG Description: Identifies an entry in the list of 'metric-type' items -bound for the TE path. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: Identifies an entry in the list of 'metric-type' items -bound for the TE path. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_upper_bound(self): - """ - Getter method for upper_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) - - YANG Description: Upper bound on the end-to-end TE path metric. A zero -indicates an unbounded upper limit for the specific -'metric-type'. - """ - return self.__upper_bound - - def _set_upper_bound(self, v, load=False): - """ - Setter method for upper_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_upper_bound is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_upper_bound() directly. - - YANG Description: Upper bound on the end-to-end TE path metric. A zero -indicates an unbounded upper limit for the specific -'metric-type'. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """upper_bound must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__upper_bound = t - if hasattr(self, '_set'): - self._set() - - def _unset_upper_bound(self): - self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - - metric_type = __builtin__.property(_get_metric_type, _set_metric_type) - upper_bound = __builtin__.property(_get_upper_bound, _set_upper_bound) - - - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('upper_bound', upper_bound), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py deleted file mode 100644 index 4a3633c28..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_list -class path_srlgs_lists(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-srlgs-lists. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path SRLG properties container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) - - _yang_name = 'path-srlgs-lists' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-srlgs-lists'] - - def _get_path_srlgs_list(self): - """ - Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list (list) - - YANG Description: List of SRLG values to be included or excluded. - """ - return self.__path_srlgs_list - - def _set_path_srlgs_list(self, v, load=False): - """ - Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_list() directly. - - YANG Description: List of SRLG values to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_list must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_srlgs_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_list(self): - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_srlgs_list = __builtin__.property(_get_path_srlgs_list, _set_path_srlgs_list) - - - _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py deleted file mode 100644 index 25eecfaa4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_list(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-srlgs-lists/path-srlgs-list. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of SRLG values to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) - - _yang_name = 'path-srlgs-list' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-srlgs-lists', 'path-srlgs-list'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_values(self): - """ - Getter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) - - YANG Description: List of SRLG values. - """ - return self.__values - - def _set_values(self, v, load=False): - """ - Setter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_values() directly. - - YANG Description: List of SRLG values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """values must be of a type compatible with srlg""", - 'defined-type': "ietf-te-topology:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True)""", - }) - - self.__values = t - if hasattr(self, '_set'): - self._set() - - def _unset_values(self): - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - values = __builtin__.property(_get_values, _set_values) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py deleted file mode 100644 index d26858176..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_name -class path_srlgs_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-srlgs-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of named SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) - - _yang_name = 'path-srlgs-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-srlgs-names'] - - def _get_path_srlgs_name(self): - """ - Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name (list) - - YANG Description: List of named SRLGs to be included or excluded. - """ - return self.__path_srlgs_name - - def _set_path_srlgs_name(self, v, load=False): - """ - Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_name() directly. - - YANG Description: List of named SRLGs to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_srlgs_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_name(self): - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_srlgs_name = __builtin__.property(_get_path_srlgs_name, _set_path_srlgs_name) - - - _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py deleted file mode 100644 index 305a401ae..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-srlgs-names/path-srlgs-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named SRLGs to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) - - _yang_name = 'path-srlgs-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-srlgs-names', 'path-srlgs-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_names(self): - """ - Getter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/names (string) - - YANG Description: List of named SRLGs. - """ - return self.__names - - def _set_names(self, v, load=False): - """ - Setter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/names (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_names() directly. - - YANG Description: List of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """names must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__names = t - if hasattr(self, '_set'): - self._set() - - def _unset_names(self): - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - names = __builtin__.property(_get_names, _set_names) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py deleted file mode 100644 index 040c69e2f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py deleted file mode 100644 index a1d6ad917..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - - - def _get_odtu_flex_type(self): - """ - Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -set up along the underlay paths of these OTN -connectivity matrices. - """ - return self.__odtu_flex_type - - def _set_odtu_flex_type(self, v, load=False): - """ - Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_odtu_flex_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odtu_flex_type() directly. - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -set up along the underlay paths of these OTN -connectivity matrices. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", - 'defined-type': "l1-types:odtu-flex-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", - }) - - self.__odtu_flex_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odtu_flex_type(self): - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - - odulist = __builtin__.property(_get_odulist, _set_odulist) - odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) - - __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} - _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index c6577089c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - number = __builtin__.property(_get_number, _set_number) - ts_number = __builtin__.property(_get_ts_number, _set_ts_number) - - __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py deleted file mode 100644 index 5633ecb2d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py +++ /dev/null @@ -1,318 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_metric -from . import path_affinities_values -from . import path_affinity_names -from . import path_srlgs_lists -from . import path_srlgs_names -from . import path_route_objects -class path_properties(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The TE path properties. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_metric','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__path_route_objects',) - - _yang_name = 'path-properties' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties'] - - def _get_path_metric(self): - """ - Getter method for path_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric (list) - - YANG Description: TE path metric type. - """ - return self.__path_metric - - def _set_path_metric(self, v, load=False): - """ - Setter method for path_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric() directly. - - YANG Description: TE path metric type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric(self): - self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_path_affinities_values(self): - """ - Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values (container) - - YANG Description: Path affinities represented as values. - """ - return self.__path_affinities_values - - def _set_path_affinities_values(self, v, load=False): - """ - Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_values() directly. - - YANG Description: Path affinities represented as values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_values must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinities_values = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_values(self): - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_affinity_names(self): - """ - Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names (container) - - YANG Description: Path affinities represented as names. - """ - return self.__path_affinity_names - - def _set_path_affinity_names(self, v, load=False): - """ - Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_names() directly. - - YANG Description: Path affinities represented as names. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinity_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_names(self): - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_lists(self): - """ - Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists (container) - - YANG Description: Path SRLG properties container. - """ - return self.__path_srlgs_lists - - def _set_path_srlgs_lists(self, v, load=False): - """ - Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_lists is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_lists() directly. - - YANG Description: Path SRLG properties container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_lists must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_lists = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_lists(self): - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_names(self): - """ - Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names (container) - - YANG Description: Container for the list of named SRLGs. - """ - return self.__path_srlgs_names - - def _set_path_srlgs_names(self, v, load=False): - """ - Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_names() directly. - - YANG Description: Container for the list of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_names(self): - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_route_objects(self): - """ - Getter method for path_route_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects (container) - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - return self.__path_route_objects - - def _set_path_route_objects(self, v, load=False): - """ - Setter method for path_route_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_route_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_route_objects() directly. - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_route_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_route_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_route_objects(self): - self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - path_metric = __builtin__.property(_get_path_metric) - path_affinities_values = __builtin__.property(_get_path_affinities_values) - path_affinity_names = __builtin__.property(_get_path_affinity_names) - path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) - path_srlgs_names = __builtin__.property(_get_path_srlgs_names) - path_route_objects = __builtin__.property(_get_path_route_objects) - - - _pyangbind_elements = OrderedDict([('path_metric', path_metric), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('path_route_objects', path_route_objects), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py deleted file mode 100644 index 49d1090f2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinities_value -class path_affinities_values(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-affinities-values. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as values. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) - - _yang_name = 'path-affinities-values' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-affinities-values'] - - def _get_path_affinities_value(self): - """ - Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinities_value - - def _set_path_affinities_value(self, v, load=False): - """ - Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_value() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_value must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinities_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_value(self): - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinities_value = __builtin__.property(_get_path_affinities_value) - - - _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py deleted file mode 100644 index e387bf9bf..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_affinities_value(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-affinities-values/path-affinities-value. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) - - _yang_name = 'path-affinities-value' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-affinities-values', 'path-affinities-value'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/usage (identityref) - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) - - YANG Description: The affinity value. The default is empty. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: The affinity value. The default is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with admin-groups""", - 'defined-type': "ietf-te-topology:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - - usage = __builtin__.property(_get_usage) - value = __builtin__.property(_get_value) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py deleted file mode 100644 index 904de87a1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinity_name -class path_affinity_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-affinity-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as names. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) - - _yang_name = 'path-affinity-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-affinity-names'] - - def _get_path_affinity_name(self): - """ - Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinity_name - - def _set_path_affinity_name(self, v, load=False): - """ - Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_name() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_name(self): - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinity_name = __builtin__.property(_get_path_affinity_name) - - - _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py deleted file mode 100644 index c7b9e5faf..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import affinity_name -class path_affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-affinity-names/path-affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) - - _yang_name = 'path-affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-affinity-names', 'path-affinity-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/usage (identityref) - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_affinity_name(self): - """ - Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) - - YANG Description: List of named affinities. - """ - return self.__affinity_name - - def _set_affinity_name(self, v, load=False): - """ - Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_affinity_name() directly. - - YANG Description: List of named affinities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_affinity_name(self): - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - usage = __builtin__.property(_get_usage) - affinity_name = __builtin__.property(_get_affinity_name) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py deleted file mode 100644 index 8e41672e8..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-affinity-names/path-affinity-name/affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinities. - """ - __slots__ = ('_path_helper', '_extmethods', '__name',) - - _yang_name = 'affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) - - YANG Description: Identifies a named affinity entry. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Identifies a named affinity entry. - """ - 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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - name = __builtin__.property(_get_name) - - - _pyangbind_elements = OrderedDict([('name', name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py deleted file mode 100644 index 0a8fae1c4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py +++ /dev/null @@ -1,159 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_metric(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-metric. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric type. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__accumulative_value',) - - _yang_name = 'path-metric' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-metric'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/metric_type (identityref) - - YANG Description: TE path metric type. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: TE path metric type. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_accumulative_value(self): - """ - Getter method for accumulative_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/accumulative_value (uint64) - - YANG Description: TE path metric accumulative value. - """ - return self.__accumulative_value - - def _set_accumulative_value(self, v, load=False): - """ - Setter method for accumulative_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/accumulative_value (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_accumulative_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_accumulative_value() directly. - - YANG Description: TE path metric accumulative value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """accumulative_value must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__accumulative_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_accumulative_value(self): - self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - - metric_type = __builtin__.property(_get_metric_type) - accumulative_value = __builtin__.property(_get_accumulative_value) - - - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('accumulative_value', accumulative_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py deleted file mode 100644 index 9f30f10e6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_route_object -class path_route_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_route_object',) - - _yang_name = 'path-route-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects'] - - def _get_path_route_object(self): - """ - Getter method for path_route_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object (list) - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - return self.__path_route_object - - def _set_path_route_object(self, v, load=False): - """ - Setter method for path_route_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_route_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_route_object() directly. - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_route_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_route_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_route_object(self): - self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_route_object = __builtin__.property(_get_path_route_object) - - - _pyangbind_elements = OrderedDict([('path_route_object', path_route_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py deleted file mode 100644 index 9e85f737c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py +++ /dev/null @@ -1,327 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_route_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-route-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key -values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key -values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - index = __builtin__.property(_get_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py deleted file mode 100644 index 14f8c67c4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py deleted file mode 100644 index d816d11be..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py deleted file mode 100644 index 2b21aa6b8..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index f24877ab2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py deleted file mode 100644 index 266d0f1c0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py deleted file mode 100644 index 1e2ef7ce2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index 70b149a48..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py deleted file mode 100644 index b6b374b8c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_list -class path_srlgs_lists(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-srlgs-lists. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path SRLG properties container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) - - _yang_name = 'path-srlgs-lists' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-srlgs-lists'] - - def _get_path_srlgs_list(self): - """ - Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list (list) - - YANG Description: List of SRLG values to be included or excluded. - """ - return self.__path_srlgs_list - - def _set_path_srlgs_list(self, v, load=False): - """ - Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_list() directly. - - YANG Description: List of SRLG values to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_list must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_list(self): - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_list = __builtin__.property(_get_path_srlgs_list) - - - _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py deleted file mode 100644 index 59e2a8be2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_list(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-srlgs-lists/path-srlgs-list. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of SRLG values to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) - - _yang_name = 'path-srlgs-list' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-srlgs-lists', 'path-srlgs-list'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_values(self): - """ - Getter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) - - YANG Description: List of SRLG values. - """ - return self.__values - - def _set_values(self, v, load=False): - """ - Setter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_values() directly. - - YANG Description: List of SRLG values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """values must be of a type compatible with srlg""", - 'defined-type': "ietf-te-topology:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", - }) - - self.__values = t - if hasattr(self, '_set'): - self._set() - - def _unset_values(self): - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - - usage = __builtin__.property(_get_usage) - values = __builtin__.property(_get_values) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py deleted file mode 100644 index 106738441..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_name -class path_srlgs_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-srlgs-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of named SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) - - _yang_name = 'path-srlgs-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-srlgs-names'] - - def _get_path_srlgs_name(self): - """ - Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name (list) - - YANG Description: List of named SRLGs to be included or excluded. - """ - return self.__path_srlgs_name - - def _set_path_srlgs_name(self, v, load=False): - """ - Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_name() directly. - - YANG Description: List of named SRLGs to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_name(self): - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_name = __builtin__.property(_get_path_srlgs_name) - - - _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py deleted file mode 100644 index 20a2aee2a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-srlgs-names/path-srlgs-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named SRLGs to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) - - _yang_name = 'path-srlgs-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-srlgs-names', 'path-srlgs-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_names(self): - """ - Getter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/names (string) - - YANG Description: List of named SRLGs. - """ - return self.__names - - def _set_names(self, v, load=False): - """ - Setter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/names (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_names() directly. - - YANG Description: List of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """names must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__names = t - if hasattr(self, '_set'): - self._set() - - def _unset_names(self): - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - usage = __builtin__.property(_get_usage) - names = __builtin__.property(_get_names) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py deleted file mode 100644 index 4d1acaeb5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py +++ /dev/null @@ -1,326 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import primary_path -from . import backup_path -from . import tunnel_termination_points -from . import tunnels -class underlay(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Attributes of the TE link underlay. - """ - __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) - - _yang_name = 'underlay' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay'] - - def _get_enabled(self): - """ - Getter method for enabled, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/enabled (boolean) - - YANG Description: 'true' if the underlay is enabled. -'false' if the underlay is disabled. - """ - return self.__enabled - - def _set_enabled(self, v, load=False): - """ - Setter method for enabled, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/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: 'true' if the underlay is enabled. -'false' if the underlay is 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_primary_path(self): - """ - Getter method for primary_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path (container) - - YANG Description: The service path on the underlay topology that -supports this link. - """ - return self.__primary_path - - def _set_primary_path(self, v, load=False): - """ - Setter method for primary_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_primary_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_primary_path() directly. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """primary_path must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__primary_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_primary_path(self): - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_backup_path(self): - """ - Getter method for backup_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path (list) - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - return self.__backup_path - - def _set_backup_path(self, v, load=False): - """ - Setter method for backup_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_backup_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_backup_path() directly. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """backup_path must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__backup_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_backup_path(self): - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_protection_type(self): - """ - Getter method for protection_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/protection_type (identityref) - - YANG Description: Underlay protection type desired for this link. - """ - return self.__protection_type - - def _set_protection_type(self, v, load=False): - """ - Setter method for protection_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/protection_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_protection_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_protection_type() directly. - - YANG Description: Underlay protection type desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """protection_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__protection_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_protection_type(self): - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_tunnel_termination_points(self): - """ - Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points (container) - - YANG Description: Underlay TTPs desired for this link. - """ - return self.__tunnel_termination_points - - def _set_tunnel_termination_points(self, v, load=False): - """ - Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_termination_points is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_termination_points() directly. - - YANG Description: Underlay TTPs desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_termination_points must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tunnel_termination_points = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_termination_points(self): - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_tunnels(self): - """ - Getter method for tunnels, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels (container) - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - return self.__tunnels - - def _set_tunnels(self, v, load=False): - """ - Setter method for tunnels, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnels is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnels() directly. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnels must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tunnels = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnels(self): - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - enabled = __builtin__.property(_get_enabled, _set_enabled) - primary_path = __builtin__.property(_get_primary_path, _set_primary_path) - backup_path = __builtin__.property(_get_backup_path, _set_backup_path) - protection_type = __builtin__.property(_get_protection_type, _set_protection_type) - tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points, _set_tunnel_termination_points) - tunnels = __builtin__.property(_get_tunnels, _set_tunnels) - - - _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py deleted file mode 100644 index d6dae0208..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py +++ /dev/null @@ -1,207 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class backup_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) - - _yang_name = 'backup-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/index (uint32) - - YANG Description: A sequence number to identify a backup path. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: A sequence number to identify a backup path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element (list) - - YANG Description: A list of path elements describing the backup service -path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the backup service -path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - path_element = __builtin__.property(_get_path_element, _set_path_element) - - - _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py deleted file mode 100644 index 32f0ddafb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py +++ /dev/null @@ -1,321 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the backup service -path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index 3522a13e9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py deleted file mode 100644 index ce150a605..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index ef37b6389..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 64da0e1fd..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index 7b441de5c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index 9a2ff93d5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index 8f686b596..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py deleted file mode 100644 index c75b0b216..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class primary_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) - - _yang_name = 'primary-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element (list) - - YANG Description: A list of path elements describing the service path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the service path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - path_element = __builtin__.property(_get_path_element, _set_path_element) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py deleted file mode 100644 index e9c1a6170..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py +++ /dev/null @@ -1,320 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the service path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index 2c3bb0005..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py deleted file mode 100644 index fc6a16219..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index d1db2ca23..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 0b291e326..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index ccb0ca471..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index 5c0fdf8da..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index c70dd4cc0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py deleted file mode 100644 index 01b0c3976..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel_termination_points(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/tunnel-termination-points. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TTPs desired for this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) - - _yang_name = 'tunnel-termination-points' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'tunnel-termination-points'] - - def _get_source(self): - """ - Getter method for source, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/source (binary) - - YANG Description: Source TTP identifier. - """ - return self.__source - - def _set_source(self, v, load=False): - """ - Setter method for source, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/source (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_source is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_source() directly. - - YANG Description: Source TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """source must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__source = t - if hasattr(self, '_set'): - self._set() - - def _unset_source(self): - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - - def _get_destination(self): - """ - Getter method for destination, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/destination (binary) - - YANG Description: Destination TTP identifier. - """ - return self.__destination - - def _set_destination(self, v, load=False): - """ - Setter method for destination, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/destination (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_destination is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_destination() directly. - - YANG Description: Destination TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """destination must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__destination = t - if hasattr(self, '_set'): - self._set() - - def _unset_destination(self): - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - source = __builtin__.property(_get_source, _set_source) - destination = __builtin__.property(_get_destination, _set_destination) - - - _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py deleted file mode 100644 index c8b792d49..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py +++ /dev/null @@ -1,167 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tunnel -class tunnels(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/tunnels. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) - - _yang_name = 'tunnels' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'tunnels'] - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_tunnel(self): - """ - Getter method for tunnel, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel (list) - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - return self.__tunnel - - def _set_tunnel(self, v, load=False): - """ - Setter method for tunnel, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel() directly. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__tunnel = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel(self): - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - sharing = __builtin__.property(_get_sharing, _set_sharing) - tunnel = __builtin__.property(_get_tunnel, _set_tunnel) - - - _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py deleted file mode 100644 index 03756dbc3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py +++ /dev/null @@ -1,170 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/tunnels/tunnel. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) - - _yang_name = 'tunnel' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'tunnels', 'tunnel'] - - def _get_tunnel_name(self): - """ - Getter method for tunnel_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/tunnel_name (string) - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - return self.__tunnel_name - - def _set_tunnel_name(self, v, load=False): - """ - Setter method for tunnel_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/tunnel_name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_name() directly. - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - 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=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__tunnel_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_name(self): - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - tunnel_name = __builtin__.property(_get_tunnel_name, _set_tunnel_name) - sharing = __builtin__.property(_get_sharing, _set_sharing) - - - _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py deleted file mode 100644 index 2e4a62679..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class underlay_topology(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/underlay-topology. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: When an abstract node encapsulates a topology, the -attributes in this container point to said topology. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref',) - - _yang_name = 'underlay-topology' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', 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 ['networks', 'network', 'node', 'te', 'te-node-attributes', 'underlay-topology'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/underlay_topology/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/underlay_topology/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/__init__.py deleted file mode 100644 index 92fbb57f7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/__init__.py +++ /dev/null @@ -1,597 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import client_layer_adaptation -from . import local_link_connectivities -from . import geolocation -from . import statistics -from . import supporting_tunnel_termination_point -class tunnel_termination_point(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A termination point can terminate a tunnel. - """ - __slots__ = ('_path_helper', '_extmethods', '__tunnel_tp_id','__admin_status','__name','__switching_capability','__encoding','__inter_layer_lock_id','__protection_type','__client_layer_adaptation','__local_link_connectivities','__oper_status','__geolocation','__statistics','__supporting_tunnel_termination_point',) - - _yang_name = 'tunnel-termination-point' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tunnel_tp_id = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__inter_layer_lock_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__client_layer_adaptation = YANGDynClass(base=client_layer_adaptation.client_layer_adaptation, is_container='container', yang_name="client-layer-adaptation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__local_link_connectivities = YANGDynClass(base=local_link_connectivities.local_link_connectivities, is_container='container', yang_name="local-link-connectivities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) - self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__supporting_tunnel_termination_point = YANGDynClass(base=YANGListType("node_ref tunnel_tp_ref",supporting_tunnel_termination_point.supporting_tunnel_termination_point, yang_name="supporting-tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-ref tunnel-tp-ref', extensions=None), is_container='list', yang_name="supporting-tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point'] - - def _get_tunnel_tp_id(self): - """ - Getter method for tunnel_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/tunnel_tp_id (binary) - - YANG Description: TTP identifier. - """ - return self.__tunnel_tp_id - - def _set_tunnel_tp_id(self, v, load=False): - """ - Setter method for tunnel_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/tunnel_tp_id (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_tp_id() directly. - - YANG Description: TTP identifier. - """ - 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=YANGBinary, is_leaf=True, yang_name="tunnel-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_tp_id must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__tunnel_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_tp_id(self): - self.__tunnel_tp_id = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - - def _get_admin_status(self): - """ - Getter method for admin_status, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/admin_status (te-types:te-admin-status) - - YANG Description: The administrative state of the TTP. - """ - return self.__admin_status - - def _set_admin_status(self, v, load=False): - """ - Setter method for admin_status, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/admin_status (te-types:te-admin-status) - If this variable is read-only (config: false) in the - source YANG file, then _set_admin_status is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_admin_status() directly. - - YANG Description: The administrative state of the TTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """admin_status must be of a type compatible with te-types:te-admin-status""", - 'defined-type': "te-types:te-admin-status", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True)""", - }) - - self.__admin_status = t - if hasattr(self, '_set'): - self._set() - - def _unset_admin_status(self): - self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/name (string) - - YANG Description: A descriptive name for the TTP. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: A descriptive name for the TTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_switching_capability(self): - """ - Getter method for switching_capability, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/switching_capability (identityref) - - YANG Description: Switching capability for this interface. - """ - return self.__switching_capability - - def _set_switching_capability(self, v, load=False): - """ - Setter method for switching_capability, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/switching_capability (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_switching_capability is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_switching_capability() directly. - - YANG Description: Switching capability for this interface. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """switching_capability must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__switching_capability = t - if hasattr(self, '_set'): - self._set() - - def _unset_switching_capability(self): - self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_encoding(self): - """ - Getter method for encoding, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/encoding (identityref) - - YANG Description: Encoding supported by this interface. - """ - return self.__encoding - - def _set_encoding(self, v, load=False): - """ - Setter method for encoding, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/encoding (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_encoding is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_encoding() directly. - - YANG Description: Encoding supported by this interface. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """encoding must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__encoding = t - if hasattr(self, '_set'): - self._set() - - def _unset_encoding(self): - self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_inter_layer_lock_id(self): - """ - Getter method for inter_layer_lock_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/inter_layer_lock_id (uint32) - - YANG Description: Inter-layer lock ID, used for path computation in a TE -topology covering multiple layers or multiple regions. - """ - return self.__inter_layer_lock_id - - def _set_inter_layer_lock_id(self, v, load=False): - """ - Setter method for inter_layer_lock_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/inter_layer_lock_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_inter_layer_lock_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_inter_layer_lock_id() directly. - - YANG Description: Inter-layer lock ID, used for path computation in a TE -topology covering multiple layers or multiple regions. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """inter_layer_lock_id must be of a type compatible with uint32""", - 'defined-type': "uint32", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__inter_layer_lock_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_inter_layer_lock_id(self): - self.__inter_layer_lock_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_protection_type(self): - """ - Getter method for protection_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/protection_type (identityref) - - YANG Description: The protection type that this TTP is capable of. - """ - return self.__protection_type - - def _set_protection_type(self, v, load=False): - """ - Setter method for protection_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/protection_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_protection_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_protection_type() directly. - - YANG Description: The protection type that this TTP is capable of. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """protection_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__protection_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_protection_type(self): - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_client_layer_adaptation(self): - """ - Getter method for client_layer_adaptation, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation (container) - - YANG Description: Contains capability information to support a client-layer -adaptation in a multi-layer topology. - """ - return self.__client_layer_adaptation - - def _set_client_layer_adaptation(self, v, load=False): - """ - Setter method for client_layer_adaptation, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_client_layer_adaptation is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_client_layer_adaptation() directly. - - YANG Description: Contains capability information to support a client-layer -adaptation in a multi-layer topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=client_layer_adaptation.client_layer_adaptation, is_container='container', yang_name="client-layer-adaptation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """client_layer_adaptation must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=client_layer_adaptation.client_layer_adaptation, is_container='container', yang_name="client-layer-adaptation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__client_layer_adaptation = t - if hasattr(self, '_set'): - self._set() - - def _unset_client_layer_adaptation(self): - self.__client_layer_adaptation = YANGDynClass(base=client_layer_adaptation.client_layer_adaptation, is_container='container', yang_name="client-layer-adaptation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_local_link_connectivities(self): - """ - Getter method for local_link_connectivities, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities (container) - - YANG Description: Contains an LLCL for a TTP on a TE node. - """ - return self.__local_link_connectivities - - def _set_local_link_connectivities(self, v, load=False): - """ - Setter method for local_link_connectivities, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_local_link_connectivities is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_local_link_connectivities() directly. - - YANG Description: Contains an LLCL for a TTP on a TE node. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=local_link_connectivities.local_link_connectivities, is_container='container', yang_name="local-link-connectivities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """local_link_connectivities must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=local_link_connectivities.local_link_connectivities, is_container='container', yang_name="local-link-connectivities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__local_link_connectivities = t - if hasattr(self, '_set'): - self._set() - - def _unset_local_link_connectivities(self): - self.__local_link_connectivities = YANGDynClass(base=local_link_connectivities.local_link_connectivities, is_container='container', yang_name="local-link-connectivities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_oper_status(self): - """ - Getter method for oper_status, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/oper_status (te-types:te-oper-status) - - YANG Description: The current operational state of the TTP. - """ - return self.__oper_status - - def _set_oper_status(self, v, load=False): - """ - Setter method for oper_status, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/oper_status (te-types:te-oper-status) - If this variable is read-only (config: false) in the - source YANG file, then _set_oper_status is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_oper_status() directly. - - YANG Description: The current operational state of the TTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """oper_status must be of a type compatible with te-types:te-oper-status""", - 'defined-type': "te-types:te-oper-status", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False)""", - }) - - self.__oper_status = t - if hasattr(self, '_set'): - self._set() - - def _unset_oper_status(self): - self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) - - - def _get_geolocation(self): - """ - Getter method for geolocation, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation (container) - - YANG Description: Contains a GPS location. - """ - return self.__geolocation - - def _set_geolocation(self, v, load=False): - """ - Setter method for geolocation, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_geolocation is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_geolocation() directly. - - YANG Description: Contains a GPS location. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """geolocation must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__geolocation = t - if hasattr(self, '_set'): - self._set() - - def _unset_geolocation(self): - self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_statistics(self): - """ - Getter method for statistics, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics (container) - - YANG Description: Statistics data. - """ - return self.__statistics - - def _set_statistics(self, v, load=False): - """ - Setter method for statistics, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_statistics is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_statistics() directly. - - YANG Description: Statistics data. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """statistics must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__statistics = t - if hasattr(self, '_set'): - self._set() - - def _unset_statistics(self): - self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_supporting_tunnel_termination_point(self): - """ - Getter method for supporting_tunnel_termination_point, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point (list) - - YANG Description: Identifies the TTPs on which this TTP depends. - """ - return self.__supporting_tunnel_termination_point - - def _set_supporting_tunnel_termination_point(self, v, load=False): - """ - Setter method for supporting_tunnel_termination_point, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_supporting_tunnel_termination_point is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_supporting_tunnel_termination_point() directly. - - YANG Description: Identifies the TTPs on which this TTP depends. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("node_ref tunnel_tp_ref",supporting_tunnel_termination_point.supporting_tunnel_termination_point, yang_name="supporting-tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-ref tunnel-tp-ref', extensions=None), is_container='list', yang_name="supporting-tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """supporting_tunnel_termination_point must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("node_ref tunnel_tp_ref",supporting_tunnel_termination_point.supporting_tunnel_termination_point, yang_name="supporting-tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-ref tunnel-tp-ref', extensions=None), is_container='list', yang_name="supporting-tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__supporting_tunnel_termination_point = t - if hasattr(self, '_set'): - self._set() - - def _unset_supporting_tunnel_termination_point(self): - self.__supporting_tunnel_termination_point = YANGDynClass(base=YANGListType("node_ref tunnel_tp_ref",supporting_tunnel_termination_point.supporting_tunnel_termination_point, yang_name="supporting-tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-ref tunnel-tp-ref', extensions=None), is_container='list', yang_name="supporting-tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - tunnel_tp_id = __builtin__.property(_get_tunnel_tp_id, _set_tunnel_tp_id) - admin_status = __builtin__.property(_get_admin_status, _set_admin_status) - name = __builtin__.property(_get_name, _set_name) - switching_capability = __builtin__.property(_get_switching_capability, _set_switching_capability) - encoding = __builtin__.property(_get_encoding, _set_encoding) - inter_layer_lock_id = __builtin__.property(_get_inter_layer_lock_id, _set_inter_layer_lock_id) - protection_type = __builtin__.property(_get_protection_type, _set_protection_type) - client_layer_adaptation = __builtin__.property(_get_client_layer_adaptation, _set_client_layer_adaptation) - local_link_connectivities = __builtin__.property(_get_local_link_connectivities, _set_local_link_connectivities) - oper_status = __builtin__.property(_get_oper_status) - geolocation = __builtin__.property(_get_geolocation) - statistics = __builtin__.property(_get_statistics) - supporting_tunnel_termination_point = __builtin__.property(_get_supporting_tunnel_termination_point, _set_supporting_tunnel_termination_point) - - - _pyangbind_elements = OrderedDict([('tunnel_tp_id', tunnel_tp_id), ('admin_status', admin_status), ('name', name), ('switching_capability', switching_capability), ('encoding', encoding), ('inter_layer_lock_id', inter_layer_lock_id), ('protection_type', protection_type), ('client_layer_adaptation', client_layer_adaptation), ('local_link_connectivities', local_link_connectivities), ('oper_status', oper_status), ('geolocation', geolocation), ('statistics', statistics), ('supporting_tunnel_termination_point', supporting_tunnel_termination_point), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py deleted file mode 100644 index 35927a2b6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py +++ /dev/null @@ -1,117 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import switching_capability -class client_layer_adaptation(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/client-layer-adaptation. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains capability information to support a client-layer -adaptation in a multi-layer topology. - """ - __slots__ = ('_path_helper', '_extmethods', '__switching_capability',) - - _yang_name = 'client-layer-adaptation' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",switching_capability.switching_capability, yang_name="switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'client-layer-adaptation'] - - def _get_switching_capability(self): - """ - Getter method for switching_capability, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability (list) - - YANG Description: List of supported switching capabilities. - """ - return self.__switching_capability - - def _set_switching_capability(self, v, load=False): - """ - Setter method for switching_capability, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_switching_capability is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_switching_capability() directly. - - YANG Description: List of supported switching capabilities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("switching_capability encoding",switching_capability.switching_capability, yang_name="switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """switching_capability must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("switching_capability encoding",switching_capability.switching_capability, yang_name="switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__switching_capability = t - if hasattr(self, '_set'): - self._set() - - def _unset_switching_capability(self): - self.__switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",switching_capability.switching_capability, yang_name="switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - switching_capability = __builtin__.property(_get_switching_capability, _set_switching_capability) - - - _pyangbind_elements = OrderedDict([('switching_capability', switching_capability), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py deleted file mode 100644 index 4f565ac10..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py +++ /dev/null @@ -1,206 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class switching_capability(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/client-layer-adaptation/switching-capability. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of supported switching capabilities. - """ - __slots__ = ('_path_helper', '_extmethods', '__switching_capability','__encoding','__te_bandwidth',) - - _yang_name = 'switching-capability' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'client-layer-adaptation', 'switching-capability'] - - def _get_switching_capability(self): - """ - Getter method for switching_capability, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/switching_capability (identityref) - - YANG Description: Switching capability for the client-layer adaptation. - """ - return self.__switching_capability - - def _set_switching_capability(self, v, load=False): - """ - Setter method for switching_capability, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/switching_capability (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_switching_capability is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_switching_capability() directly. - - YANG Description: Switching capability for the client-layer adaptation. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """switching_capability must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__switching_capability = t - if hasattr(self, '_set'): - self._set() - - def _unset_switching_capability(self): - self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_encoding(self): - """ - Getter method for encoding, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/encoding (identityref) - - YANG Description: Encoding supported by the client-layer adaptation. - """ - return self.__encoding - - def _set_encoding(self, v, load=False): - """ - Setter method for encoding, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/encoding (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_encoding is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_encoding() directly. - - YANG Description: Encoding supported by the client-layer adaptation. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """encoding must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__encoding = t - if hasattr(self, '_set'): - self._set() - - def _unset_encoding(self): - self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - switching_capability = __builtin__.property(_get_switching_capability, _set_switching_capability) - encoding = __builtin__.property(_get_encoding, _set_encoding) - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('switching_capability', switching_capability), ('encoding', encoding), ('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py deleted file mode 100644 index 52516d759..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/client-layer-adaptation/switching-capability/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'client-layer-adaptation', 'switching-capability', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/__init__.py deleted file mode 100644 index 3f44ede78..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/client-layer-adaptation/switching-capability/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'client-layer-adaptation', 'switching-capability', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - - - def _get_odtu_flex_type(self): - """ - Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -terminated on this OTN Tunnel Termination Point -(TTP). - """ - return self.__odtu_flex_type - - def _set_odtu_flex_type(self, v, load=False): - """ - Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_odtu_flex_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odtu_flex_type() directly. - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -terminated on this OTN Tunnel Termination Point -(TTP). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", - 'defined-type': "l1-types:odtu-flex-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", - }) - - self.__odtu_flex_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odtu_flex_type(self): - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - - odulist = __builtin__.property(_get_odulist, _set_odulist) - odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) - - __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} - _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index d4cb37ddf..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/client-layer-adaptation/switching-capability/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'client-layer-adaptation', 'switching-capability', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - number = __builtin__.property(_get_number, _set_number) - ts_number = __builtin__.property(_get_ts_number, _set_ts_number) - - __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py deleted file mode 100644 index 60eedb630..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class geolocation(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/geolocation. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains a GPS location. - """ - __slots__ = ('_path_helper', '_extmethods', '__altitude','__latitude','__longitude',) - - _yang_name = 'geolocation' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) - self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'geolocation'] - - def _get_altitude(self): - """ - Getter method for altitude, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation/altitude (int64) - - YANG Description: Distance above sea level. - """ - return self.__altitude - - def _set_altitude(self, v, load=False): - """ - Setter method for altitude, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation/altitude (int64) - If this variable is read-only (config: false) in the - source YANG file, then _set_altitude is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_altitude() directly. - - YANG Description: Distance above sea level. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """altitude must be of a type compatible with int64""", - 'defined-type': "int64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False)""", - }) - - self.__altitude = t - if hasattr(self, '_set'): - self._set() - - def _unset_altitude(self): - self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) - - - def _get_latitude(self): - """ - Getter method for latitude, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation/latitude (geographic-coordinate-degree) - - YANG Description: Relative position north or south on the Earth's surface. - """ - return self.__latitude - - def _set_latitude(self, v, load=False): - """ - Setter method for latitude, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation/latitude (geographic-coordinate-degree) - If this variable is read-only (config: false) in the - source YANG file, then _set_latitude is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_latitude() directly. - - YANG Description: Relative position north or south on the Earth's surface. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """latitude must be of a type compatible with geographic-coordinate-degree""", - 'defined-type': "ietf-te-topology:geographic-coordinate-degree", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", - }) - - self.__latitude = t - if hasattr(self, '_set'): - self._set() - - def _unset_latitude(self): - self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - - - def _get_longitude(self): - """ - Getter method for longitude, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation/longitude (geographic-coordinate-degree) - - YANG Description: Angular distance east or west on the Earth's surface. - """ - return self.__longitude - - def _set_longitude(self, v, load=False): - """ - Setter method for longitude, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation/longitude (geographic-coordinate-degree) - If this variable is read-only (config: false) in the - source YANG file, then _set_longitude is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_longitude() directly. - - YANG Description: Angular distance east or west on the Earth's surface. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """longitude must be of a type compatible with geographic-coordinate-degree""", - 'defined-type': "ietf-te-topology:geographic-coordinate-degree", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", - }) - - self.__longitude = t - if hasattr(self, '_set'): - self._set() - - def _unset_longitude(self): - self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - - altitude = __builtin__.property(_get_altitude) - latitude = __builtin__.property(_get_latitude) - longitude = __builtin__.property(_get_longitude) - - - _pyangbind_elements = OrderedDict([('altitude', altitude), ('latitude', latitude), ('longitude', longitude), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py deleted file mode 100644 index 309e87f52..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py +++ /dev/null @@ -1,418 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restrictions -from . import underlay -from . import path_constraints -from . import optimizations -from . import path_properties -from . import local_link_connectivity -class local_link_connectivities(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains an LLCL for a TTP on a TE node. - """ - __slots__ = ('_path_helper', '_extmethods', '__number_of_entries','__label_restrictions','__is_allowed','__underlay','__path_constraints','__optimizations','__path_properties','__local_link_connectivity',) - - _yang_name = 'local-link-connectivities' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__number_of_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__local_link_connectivity = YANGDynClass(base=YANGListType("link_tp_ref",local_link_connectivity.local_link_connectivity, yang_name="local-link-connectivity", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-tp-ref', extensions=None), is_container='list', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities'] - - def _get_number_of_entries(self): - """ - Getter method for number_of_entries, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/number_of_entries (uint16) - - YANG Description: The number of LLCL entries. -If this number is specified in the configuration request, -the number is the requested number of entries, which may -not all be listed in the list; -if this number is reported in the state data, -the number is the current number of operational entries. - """ - return self.__number_of_entries - - def _set_number_of_entries(self, v, load=False): - """ - Setter method for number_of_entries, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/number_of_entries (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number_of_entries is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number_of_entries() directly. - - YANG Description: The number of LLCL entries. -If this number is specified in the configuration request, -the number is the requested number of entries, which may -not all be listed in the list; -if this number is reported in the state data, -the number is the current number of operational entries. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number_of_entries must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True)""", - }) - - self.__number_of_entries = t - if hasattr(self, '_set'): - self._set() - - def _unset_number_of_entries(self): - self.__number_of_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) - - - def _get_label_restrictions(self): - """ - Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions (container) - - YANG Description: The label restrictions container. - """ - return self.__label_restrictions - - def _set_label_restrictions(self, v, load=False): - """ - Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restrictions is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restrictions() directly. - - YANG Description: The label restrictions container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restrictions must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_restrictions = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restrictions(self): - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_is_allowed(self): - """ - Getter method for is_allowed, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/is_allowed (boolean) - - YANG Description: 'true' - switching is allowed; -'false' - switching is disallowed. - """ - return self.__is_allowed - - def _set_is_allowed(self, v, load=False): - """ - Setter method for is_allowed, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/is_allowed (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_is_allowed is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_is_allowed() directly. - - YANG Description: 'true' - switching is allowed; -'false' - switching is disallowed. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """is_allowed must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__is_allowed = t - if hasattr(self, '_set'): - self._set() - - def _unset_is_allowed(self): - self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_underlay(self): - """ - Getter method for underlay, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay (container) - - YANG Description: Attributes of the TE link underlay. - """ - return self.__underlay - - def _set_underlay(self, v, load=False): - """ - Setter method for underlay, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_underlay is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_underlay() directly. - - YANG Description: Attributes of the TE link underlay. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """underlay must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__underlay = t - if hasattr(self, '_set'): - self._set() - - def _unset_underlay(self): - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_constraints(self): - """ - Getter method for path_constraints, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints (container) - - YANG Description: TE named path constraints container. - """ - return self.__path_constraints - - def _set_path_constraints(self, v, load=False): - """ - Setter method for path_constraints, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_constraints is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_constraints() directly. - - YANG Description: TE named path constraints container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_constraints must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_constraints = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_constraints(self): - self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_optimizations(self): - """ - Getter method for optimizations, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations (container) - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - return self.__optimizations - - def _set_optimizations(self, v, load=False): - """ - Setter method for optimizations, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_optimizations is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_optimizations() directly. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """optimizations must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__optimizations = t - if hasattr(self, '_set'): - self._set() - - def _unset_optimizations(self): - self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_properties(self): - """ - Getter method for path_properties, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties (container) - - YANG Description: The TE path properties. - """ - return self.__path_properties - - def _set_path_properties(self, v, load=False): - """ - Setter method for path_properties, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_properties is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_properties() directly. - - YANG Description: The TE path properties. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_properties must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_properties = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_properties(self): - self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_local_link_connectivity(self): - """ - Getter method for local_link_connectivity, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity (list) - - YANG Description: The termination capabilities between the TTP and the LTP. -This capability information can be used to compute -the tunnel path. -The Interface Adjustment Capability Descriptors (IACDs) -(defined in RFC 6001) on each LTP can be derived from -this list. - """ - return self.__local_link_connectivity - - def _set_local_link_connectivity(self, v, load=False): - """ - Setter method for local_link_connectivity, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_local_link_connectivity is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_local_link_connectivity() directly. - - YANG Description: The termination capabilities between the TTP and the LTP. -This capability information can be used to compute -the tunnel path. -The Interface Adjustment Capability Descriptors (IACDs) -(defined in RFC 6001) on each LTP can be derived from -this list. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("link_tp_ref",local_link_connectivity.local_link_connectivity, yang_name="local-link-connectivity", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-tp-ref', extensions=None), is_container='list', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """local_link_connectivity must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("link_tp_ref",local_link_connectivity.local_link_connectivity, yang_name="local-link-connectivity", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-tp-ref', extensions=None), is_container='list', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__local_link_connectivity = t - if hasattr(self, '_set'): - self._set() - - def _unset_local_link_connectivity(self): - self.__local_link_connectivity = YANGDynClass(base=YANGListType("link_tp_ref",local_link_connectivity.local_link_connectivity, yang_name="local-link-connectivity", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-tp-ref', extensions=None), is_container='list', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - number_of_entries = __builtin__.property(_get_number_of_entries, _set_number_of_entries) - label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) - is_allowed = __builtin__.property(_get_is_allowed, _set_is_allowed) - underlay = __builtin__.property(_get_underlay, _set_underlay) - path_constraints = __builtin__.property(_get_path_constraints, _set_path_constraints) - optimizations = __builtin__.property(_get_optimizations, _set_optimizations) - path_properties = __builtin__.property(_get_path_properties) - local_link_connectivity = __builtin__.property(_get_local_link_connectivity, _set_local_link_connectivity) - - - _pyangbind_elements = OrderedDict([('number_of_entries', number_of_entries), ('label_restrictions', label_restrictions), ('is_allowed', is_allowed), ('underlay', underlay), ('path_constraints', path_constraints), ('optimizations', optimizations), ('path_properties', path_properties), ('local_link_connectivity', local_link_connectivity), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py deleted file mode 100644 index 7170e4798..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restriction -class label_restrictions(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The label restrictions container. - """ - __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) - - _yang_name = 'label-restrictions' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions'] - - def _get_label_restriction(self): - """ - Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction (list) - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - return self.__label_restriction - - def _set_label_restriction(self, v, load=False): - """ - Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restriction() directly. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restriction must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__label_restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restriction(self): - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) - - - _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py deleted file mode 100644 index 6bb6db97a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py +++ /dev/null @@ -1,450 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_start -from . import label_end -from . import label_step -from . import otn_label_range -from . import ethernet_label_range -class label_restriction(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) - - _yang_name = 'label-restriction' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction'] - - def _get_restriction(self): - """ - Getter method for restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/restriction (enumeration) - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - return self.__restriction - - def _set_restriction(self, v, load=False): - """ - Setter method for restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/restriction (enumeration) - If this variable is read-only (config: false) in the - source YANG file, then _set_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restriction() directly. - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restriction must be of a type compatible with enumeration""", - 'defined-type': "ietf-te-topology:enumeration", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", - }) - - self.__restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_restriction(self): - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/index (uint32) - - YANG Description: The index of the label restriction list entry. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: The index of the label restriction list entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_label_start(self): - """ - Getter method for label_start, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start (container) - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - return self.__label_start - - def _set_label_start(self, v, load=False): - """ - Setter method for label_start, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_start is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_start() directly. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_start must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_start = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_start(self): - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_end(self): - """ - Getter method for label_end, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end (container) - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - return self.__label_end - - def _set_label_end(self, v, load=False): - """ - Setter method for label_end, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_end is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_end() directly. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_end must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_end = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_end(self): - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_step(self): - """ - Getter method for label_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step (container) - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - return self.__label_step - - def _set_label_step(self, v, load=False): - """ - Setter method for label_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_step() directly. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_step must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_step(self): - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_range_bitmap(self): - """ - Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - return self.__range_bitmap - - def _set_range_bitmap(self, v, load=False): - """ - Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_bitmap is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_bitmap() directly. - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", - 'defined-type': "yang:hex-string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", - }) - - self.__range_bitmap = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_bitmap(self): - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - - - def _get_otn_label_range(self): - """ - Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range (container) - - YANG Description: Label range information for OTN. - """ - return self.__otn_label_range - - def _set_otn_label_range(self, v, load=False): - """ - Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn_label_range() directly. - - YANG Description: Label range information for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn_label_range(self): - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_ethernet_label_range(self): - """ - Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range (container) - - YANG Description: Ethernet-specific label range related information. - """ - return self.__ethernet_label_range - - def _set_ethernet_label_range(self, v, load=False): - """ - Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_ethernet_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ethernet_label_range() directly. - - YANG Description: Ethernet-specific label range related information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ethernet_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__ethernet_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_ethernet_label_range(self): - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - restriction = __builtin__.property(_get_restriction, _set_restriction) - index = __builtin__.property(_get_index, _set_index) - label_start = __builtin__.property(_get_label_start, _set_label_start) - label_end = __builtin__.property(_get_label_end, _set_label_end) - label_step = __builtin__.property(_get_label_step, _set_label_step) - range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) - otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) - ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) - - - _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/__init__.py deleted file mode 100644 index 3ee376c6a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ethernet_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/ethernet-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Ethernet-specific label range related information. - """ - __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) - - _yang_name = 'ethernet-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] - - def _get_tag_type(self): - """ - Getter method for tag_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - - YANG Description: VLAN tag type. - """ - return self.__tag_type - - def _set_tag_type(self, v, load=False): - """ - Setter method for tag_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_tag_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tag_type() directly. - - YANG Description: VLAN tag type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", - 'defined-type': "etht-types:eth-tag-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", - }) - - self.__tag_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tag_type(self): - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - - YANG Description: priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - - tag_type = __builtin__.property(_get_tag_type, _set_tag_type) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py deleted file mode 100644 index e6bcde2cf..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_end(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-end. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-end' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-end'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py deleted file mode 100644 index d964dca5c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-end/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py deleted file mode 100644 index 360a12234..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py deleted file mode 100644 index 438d60e5b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_start(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-start. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-start' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-start'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py deleted file mode 100644 index 8e14efa20..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-start/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py deleted file mode 100644 index 56b84bbbd..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py deleted file mode 100644 index c349c4d91..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class label_step(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-step. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) - - _yang_name = 'label-step' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-step'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/generic (int32) - - YANG Description: Label range step. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/generic (int32) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Label range step. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with int32""", - 'defined-type': "int32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn (container) - - YANG Description: Label step for OTN - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label step for OTN - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_step(self): - """ - Getter method for eth_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/eth_step (uint16) - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - return self.__eth_step - - def _set_eth_step(self, v, load=False): - """ - Setter method for eth_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/eth_step (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_step() directly. - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_step must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", - }) - - self.__eth_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_step(self): - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_step = __builtin__.property(_get_eth_step, _set_eth_step) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/__init__.py deleted file mode 100644 index 0a0f6d7ae..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-step/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label step for OTN - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/__init__.py deleted file mode 100644 index bfc2cd1e0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/__init__.py +++ /dev/null @@ -1,256 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/otn-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label range information for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) - - _yang_name = 'otn-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'otn-label-range'] - - def _get_range_type(self): - """ - Getter method for range_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - return self.__range_type - - def _set_range_type(self, v, load=False): - """ - Setter method for range_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_type() directly. - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_type must be of a type compatible with otn-label-range-type""", - 'defined-type': "ietf-otn-topology:otn-label-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", - }) - - self.__range_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_type(self): - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_odu_type_list(self): - """ - Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - return self.__odu_type_list - - def _set_odu_type_list(self, v, load=False): - """ - Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type_list() directly. - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type_list must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type_list(self): - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/priority (uint8) - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - - range_type = __builtin__.property(_get_range_type, _set_range_type) - tsg = __builtin__.property(_get_tsg, _set_tsg) - odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py deleted file mode 100644 index b7a646ea6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py +++ /dev/null @@ -1,368 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restrictions -from . import underlay -from . import path_constraints -from . import optimizations -from . import path_properties -class local_link_connectivity(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The termination capabilities between the TTP and the LTP. -This capability information can be used to compute -the tunnel path. -The Interface Adjustment Capability Descriptors (IACDs) -(defined in RFC 6001) on each LTP can be derived from -this list. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_ref','__label_restrictions','__is_allowed','__underlay','__path_constraints','__optimizations','__path_properties',) - - _yang_name = 'local-link-connectivity' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity'] - - def _get_link_tp_ref(self): - """ - Getter method for link_tp_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/link_tp_ref (leafref) - - YANG Description: LTP. - """ - return self.__link_tp_ref - - def _set_link_tp_ref(self, v, load=False): - """ - Setter method for link_tp_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/link_tp_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_ref() directly. - - YANG Description: LTP. - """ - 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=six.text_type, is_leaf=True, yang_name="link-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__link_tp_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_ref(self): - self.__link_tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_label_restrictions(self): - """ - Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions (container) - - YANG Description: The label restrictions container. - """ - return self.__label_restrictions - - def _set_label_restrictions(self, v, load=False): - """ - Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restrictions is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restrictions() directly. - - YANG Description: The label restrictions container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restrictions must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_restrictions = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restrictions(self): - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_is_allowed(self): - """ - Getter method for is_allowed, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/is_allowed (boolean) - - YANG Description: 'true' - switching is allowed; -'false' - switching is disallowed. - """ - return self.__is_allowed - - def _set_is_allowed(self, v, load=False): - """ - Setter method for is_allowed, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/is_allowed (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_is_allowed is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_is_allowed() directly. - - YANG Description: 'true' - switching is allowed; -'false' - switching is disallowed. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """is_allowed must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__is_allowed = t - if hasattr(self, '_set'): - self._set() - - def _unset_is_allowed(self): - self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_underlay(self): - """ - Getter method for underlay, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay (container) - - YANG Description: Attributes of the TE link underlay. - """ - return self.__underlay - - def _set_underlay(self, v, load=False): - """ - Setter method for underlay, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_underlay is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_underlay() directly. - - YANG Description: Attributes of the TE link underlay. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """underlay must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__underlay = t - if hasattr(self, '_set'): - self._set() - - def _unset_underlay(self): - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_constraints(self): - """ - Getter method for path_constraints, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints (container) - - YANG Description: TE named path constraints container. - """ - return self.__path_constraints - - def _set_path_constraints(self, v, load=False): - """ - Setter method for path_constraints, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_constraints is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_constraints() directly. - - YANG Description: TE named path constraints container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_constraints must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_constraints = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_constraints(self): - self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_optimizations(self): - """ - Getter method for optimizations, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations (container) - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - return self.__optimizations - - def _set_optimizations(self, v, load=False): - """ - Setter method for optimizations, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_optimizations is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_optimizations() directly. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """optimizations must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__optimizations = t - if hasattr(self, '_set'): - self._set() - - def _unset_optimizations(self): - self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_properties(self): - """ - Getter method for path_properties, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties (container) - - YANG Description: The TE path properties. - """ - return self.__path_properties - - def _set_path_properties(self, v, load=False): - """ - Setter method for path_properties, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_properties is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_properties() directly. - - YANG Description: The TE path properties. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_properties must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_properties = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_properties(self): - self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - link_tp_ref = __builtin__.property(_get_link_tp_ref, _set_link_tp_ref) - label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) - is_allowed = __builtin__.property(_get_is_allowed, _set_is_allowed) - underlay = __builtin__.property(_get_underlay, _set_underlay) - path_constraints = __builtin__.property(_get_path_constraints, _set_path_constraints) - optimizations = __builtin__.property(_get_optimizations, _set_optimizations) - path_properties = __builtin__.property(_get_path_properties) - - - _pyangbind_elements = OrderedDict([('link_tp_ref', link_tp_ref), ('label_restrictions', label_restrictions), ('is_allowed', is_allowed), ('underlay', underlay), ('path_constraints', path_constraints), ('optimizations', optimizations), ('path_properties', path_properties), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py deleted file mode 100644 index 37d7f23f2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restriction -class label_restrictions(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The label restrictions container. - """ - __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) - - _yang_name = 'label-restrictions' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions'] - - def _get_label_restriction(self): - """ - Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction (list) - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - return self.__label_restriction - - def _set_label_restriction(self, v, load=False): - """ - Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restriction() directly. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restriction must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__label_restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restriction(self): - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) - - - _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py deleted file mode 100644 index 5d5f6509b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py +++ /dev/null @@ -1,450 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_start -from . import label_end -from . import label_step -from . import otn_label_range -from . import ethernet_label_range -class label_restriction(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) - - _yang_name = 'label-restriction' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction'] - - def _get_restriction(self): - """ - Getter method for restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/restriction (enumeration) - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - return self.__restriction - - def _set_restriction(self, v, load=False): - """ - Setter method for restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/restriction (enumeration) - If this variable is read-only (config: false) in the - source YANG file, then _set_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restriction() directly. - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restriction must be of a type compatible with enumeration""", - 'defined-type': "ietf-te-topology:enumeration", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", - }) - - self.__restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_restriction(self): - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/index (uint32) - - YANG Description: The index of the label restriction list entry. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: The index of the label restriction list entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_label_start(self): - """ - Getter method for label_start, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start (container) - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - return self.__label_start - - def _set_label_start(self, v, load=False): - """ - Setter method for label_start, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_start is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_start() directly. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_start must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_start = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_start(self): - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_end(self): - """ - Getter method for label_end, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end (container) - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - return self.__label_end - - def _set_label_end(self, v, load=False): - """ - Setter method for label_end, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_end is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_end() directly. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_end must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_end = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_end(self): - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_step(self): - """ - Getter method for label_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step (container) - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - return self.__label_step - - def _set_label_step(self, v, load=False): - """ - Setter method for label_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_step() directly. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_step must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_step(self): - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_range_bitmap(self): - """ - Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - return self.__range_bitmap - - def _set_range_bitmap(self, v, load=False): - """ - Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_bitmap is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_bitmap() directly. - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", - 'defined-type': "yang:hex-string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", - }) - - self.__range_bitmap = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_bitmap(self): - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - - - def _get_otn_label_range(self): - """ - Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range (container) - - YANG Description: Label range information for OTN. - """ - return self.__otn_label_range - - def _set_otn_label_range(self, v, load=False): - """ - Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn_label_range() directly. - - YANG Description: Label range information for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn_label_range(self): - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_ethernet_label_range(self): - """ - Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range (container) - - YANG Description: Ethernet-specific label range related information. - """ - return self.__ethernet_label_range - - def _set_ethernet_label_range(self, v, load=False): - """ - Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_ethernet_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ethernet_label_range() directly. - - YANG Description: Ethernet-specific label range related information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ethernet_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__ethernet_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_ethernet_label_range(self): - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - restriction = __builtin__.property(_get_restriction, _set_restriction) - index = __builtin__.property(_get_index, _set_index) - label_start = __builtin__.property(_get_label_start, _set_label_start) - label_end = __builtin__.property(_get_label_end, _set_label_end) - label_step = __builtin__.property(_get_label_step, _set_label_step) - range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) - otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) - ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) - - - _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/__init__.py deleted file mode 100644 index 17b2f661d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ethernet_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/ethernet-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Ethernet-specific label range related information. - """ - __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) - - _yang_name = 'ethernet-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] - - def _get_tag_type(self): - """ - Getter method for tag_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - - YANG Description: VLAN tag type. - """ - return self.__tag_type - - def _set_tag_type(self, v, load=False): - """ - Setter method for tag_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_tag_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tag_type() directly. - - YANG Description: VLAN tag type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", - 'defined-type': "etht-types:eth-tag-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", - }) - - self.__tag_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tag_type(self): - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - - YANG Description: priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - - tag_type = __builtin__.property(_get_tag_type, _set_tag_type) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py deleted file mode 100644 index c31cb6145..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_end(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-end. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-end' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-end'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py deleted file mode 100644 index deb12db62..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-end/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py deleted file mode 100644 index efd7f3ed2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py deleted file mode 100644 index 824467f81..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_start(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-start. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-start' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-start'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py deleted file mode 100644 index 7fddd85cf..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-start/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py deleted file mode 100644 index 44028d6f9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py deleted file mode 100644 index 58c0b9c3e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class label_step(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-step. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) - - _yang_name = 'label-step' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-step'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/generic (int32) - - YANG Description: Label range step. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/generic (int32) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Label range step. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with int32""", - 'defined-type': "int32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn (container) - - YANG Description: Label step for OTN - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label step for OTN - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_step(self): - """ - Getter method for eth_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/eth_step (uint16) - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - return self.__eth_step - - def _set_eth_step(self, v, load=False): - """ - Setter method for eth_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/eth_step (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_step() directly. - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_step must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", - }) - - self.__eth_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_step(self): - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_step = __builtin__.property(_get_eth_step, _set_eth_step) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/__init__.py deleted file mode 100644 index 7125ae3a2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-step/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label step for OTN - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/__init__.py deleted file mode 100644 index 54adb557b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/__init__.py +++ /dev/null @@ -1,256 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/otn-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label range information for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) - - _yang_name = 'otn-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'otn-label-range'] - - def _get_range_type(self): - """ - Getter method for range_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - return self.__range_type - - def _set_range_type(self, v, load=False): - """ - Setter method for range_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_type() directly. - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_type must be of a type compatible with otn-label-range-type""", - 'defined-type': "ietf-otn-topology:otn-label-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", - }) - - self.__range_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_type(self): - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_odu_type_list(self): - """ - Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - return self.__odu_type_list - - def _set_odu_type_list(self, v, load=False): - """ - Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type_list() directly. - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type_list must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type_list(self): - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/priority (uint8) - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - - range_type = __builtin__.property(_get_range_type, _set_range_type) - tsg = __builtin__.property(_get_tsg, _set_tsg) - odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py deleted file mode 100644 index 3bc26167a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py +++ /dev/null @@ -1,199 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import optimization_metric -from . import tiebreakers -from . import objective_function -class optimizations(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - __slots__ = ('_path_helper', '_extmethods', '__optimization_metric','__tiebreakers','__objective_function',) - - _yang_name = 'optimizations' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations'] - - def _get_optimization_metric(self): - """ - Getter method for optimization_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric (list) - - YANG Description: TE path metric type. - """ - return self.__optimization_metric - - def _set_optimization_metric(self, v, load=False): - """ - Setter method for optimization_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_optimization_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_optimization_metric() directly. - - YANG Description: TE path metric type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """optimization_metric must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__optimization_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_optimization_metric(self): - self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_tiebreakers(self): - """ - Getter method for tiebreakers, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers (container) - - YANG Description: Container for the list of tiebreakers. - """ - return self.__tiebreakers - - def _set_tiebreakers(self, v, load=False): - """ - Setter method for tiebreakers, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreakers is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreakers() directly. - - YANG Description: Container for the list of tiebreakers. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreakers must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tiebreakers = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreakers(self): - self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_objective_function(self): - """ - Getter method for objective_function, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function (container) - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - return self.__objective_function - - def _set_objective_function(self, v, load=False): - """ - Setter method for objective_function, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_objective_function is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_objective_function() directly. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """objective_function must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__objective_function = t - if hasattr(self, '_set'): - self._set() - - def _unset_objective_function(self): - self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - optimization_metric = __builtin__.property(_get_optimization_metric, _set_optimization_metric) - tiebreakers = __builtin__.property(_get_tiebreakers, _set_tiebreakers) - objective_function = __builtin__.property(_get_objective_function, _set_objective_function) - - __choices__ = {'algorithm': {'metric': ['optimization_metric', 'tiebreakers'], 'objective-function': ['objective_function']}} - _pyangbind_elements = OrderedDict([('optimization_metric', optimization_metric), ('tiebreakers', tiebreakers), ('objective_function', objective_function), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/__init__.py deleted file mode 100644 index 302ed4830..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class objective_function(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/objective-function. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - __slots__ = ('_path_helper', '_extmethods', '__objective_function_type',) - - _yang_name = 'objective-function' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'objective-function'] - - def _get_objective_function_type(self): - """ - Getter method for objective_function_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/objective_function_type (identityref) - - YANG Description: Objective function entry. - """ - return self.__objective_function_type - - def _set_objective_function_type(self, v, load=False): - """ - Setter method for objective_function_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/objective_function_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_objective_function_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_objective_function_type() directly. - - YANG Description: Objective function entry. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """objective_function_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__objective_function_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_objective_function_type(self): - self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - objective_function_type = __builtin__.property(_get_objective_function_type, _set_objective_function_type) - - __choices__ = {'algorithm': {'objective-function': ['objective_function_type']}} - _pyangbind_elements = OrderedDict([('objective_function_type', objective_function_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/__init__.py deleted file mode 100644 index ef6ac03d4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/__init__.py +++ /dev/null @@ -1,241 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import explicit_route_exclude_objects -from . import explicit_route_include_objects -class optimization_metric(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric type. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__weight','__explicit_route_exclude_objects','__explicit_route_include_objects',) - - _yang_name = 'optimization-metric' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/metric_type (identityref) - - YANG Description: Identifies the 'metric-type' that the path computation -process uses for optimization. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: Identifies the 'metric-type' that the path computation -process uses for optimization. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_weight(self): - """ - Getter method for weight, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/weight (uint8) - - YANG Description: TE path metric normalization weight. - """ - return self.__weight - - def _set_weight(self, v, load=False): - """ - Setter method for weight, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/weight (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_weight is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_weight() directly. - - YANG Description: TE path metric normalization weight. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """weight must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__weight = t - if hasattr(self, '_set'): - self._set() - - def _unset_weight(self): - self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_explicit_route_exclude_objects(self): - """ - Getter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects (container) - - YANG Description: Container for the 'exclude route' object list. - """ - return self.__explicit_route_exclude_objects - - def _set_explicit_route_exclude_objects(self, v, load=False): - """ - Setter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_explicit_route_exclude_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_explicit_route_exclude_objects() directly. - - YANG Description: Container for the 'exclude route' object list. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """explicit_route_exclude_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__explicit_route_exclude_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_explicit_route_exclude_objects(self): - self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_explicit_route_include_objects(self): - """ - Getter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects (container) - - YANG Description: Container for the 'include route' object list. - """ - return self.__explicit_route_include_objects - - def _set_explicit_route_include_objects(self, v, load=False): - """ - Setter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_explicit_route_include_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_explicit_route_include_objects() directly. - - YANG Description: Container for the 'include route' object list. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """explicit_route_include_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__explicit_route_include_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_explicit_route_include_objects(self): - self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - metric_type = __builtin__.property(_get_metric_type, _set_metric_type) - weight = __builtin__.property(_get_weight, _set_weight) - explicit_route_exclude_objects = __builtin__.property(_get_explicit_route_exclude_objects, _set_explicit_route_exclude_objects) - explicit_route_include_objects = __builtin__.property(_get_explicit_route_include_objects, _set_explicit_route_include_objects) - - __choices__ = {'algorithm': {'metric': ['metric_type', 'weight', 'explicit_route_exclude_objects', 'explicit_route_include_objects']}} - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('weight', weight), ('explicit_route_exclude_objects', explicit_route_exclude_objects), ('explicit_route_include_objects', explicit_route_include_objects), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py deleted file mode 100644 index f81d927f3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import route_object_exclude_object -class explicit_route_exclude_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the 'exclude route' object list. - """ - __slots__ = ('_path_helper', '_extmethods', '__route_object_exclude_object',) - - _yang_name = 'explicit-route-exclude-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects'] - - def _get_route_object_exclude_object(self): - """ - Getter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - return self.__route_object_exclude_object - - def _set_route_object_exclude_object(self, v, load=False): - """ - Setter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_route_object_exclude_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_route_object_exclude_object() directly. - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """route_object_exclude_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__route_object_exclude_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_route_object_exclude_object(self): - self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - route_object_exclude_object = __builtin__.property(_get_route_object_exclude_object, _set_route_object_exclude_object) - - __choices__ = {'algorithm': {'metric': ['route_object_exclude_object']}} - _pyangbind_elements = OrderedDict([('route_object_exclude_object', route_object_exclude_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py deleted file mode 100644 index 0ce09fde1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py +++ /dev/null @@ -1,365 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -from . import srlg -class route_object_exclude_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop','__srlg',) - - _yang_name = 'route-object-exclude-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_srlg(self): - """ - Getter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) - - YANG Description: SRLG container. - """ - return self.__srlg - - def _set_srlg(self, v, load=False): - """ - Setter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_srlg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_srlg() directly. - - YANG Description: SRLG container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """srlg must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__srlg = t - if hasattr(self, '_set'): - self._set() - - def _unset_srlg(self): - self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - srlg = __builtin__.property(_get_srlg, _set_srlg) - - __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop'], 'srlg': ['srlg']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ('srlg', srlg), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py deleted file mode 100644 index 0cbff483c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py deleted file mode 100644 index 5acd36477..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py deleted file mode 100644 index aadad5c2c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 6c0b396ee..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py deleted file mode 100644 index bda9afb84..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py deleted file mode 100644 index 5c7cd97f1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py deleted file mode 100644 index 9fdf39249..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py +++ /dev/null @@ -1,115 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class srlg(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/srlg. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: SRLG container. - """ - __slots__ = ('_path_helper', '_extmethods', '__srlg',) - - _yang_name = 'srlg' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'srlg'] - - def _get_srlg(self): - """ - Getter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) - - YANG Description: SRLG value. - """ - return self.__srlg - - def _set_srlg(self, v, load=False): - """ - Setter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_srlg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_srlg() directly. - - YANG Description: SRLG value. - """ - 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="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """srlg 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="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__srlg = t - if hasattr(self, '_set'): - self._set() - - def _unset_srlg(self): - self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - srlg = __builtin__.property(_get_srlg, _set_srlg) - - __choices__ = {'type': {'srlg': ['srlg']}} - _pyangbind_elements = OrderedDict([('srlg', srlg), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index b5794e333..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/__init__.py deleted file mode 100644 index f5e9a3732..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import route_object_include_object -class explicit_route_include_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the 'include route' object list. - """ - __slots__ = ('_path_helper', '_extmethods', '__route_object_include_object',) - - _yang_name = 'explicit-route-include-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects'] - - def _get_route_object_include_object(self): - """ - Getter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - return self.__route_object_include_object - - def _set_route_object_include_object(self, v, load=False): - """ - Setter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_route_object_include_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_route_object_include_object() directly. - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """route_object_include_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__route_object_include_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_route_object_include_object(self): - self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - route_object_include_object = __builtin__.property(_get_route_object_include_object, _set_route_object_include_object) - - __choices__ = {'algorithm': {'metric': ['route_object_include_object']}} - _pyangbind_elements = OrderedDict([('route_object_include_object', route_object_include_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py deleted file mode 100644 index 374536eb4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py +++ /dev/null @@ -1,325 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class route_object_include_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'route-object-include-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py deleted file mode 100644 index 0b9ce19d6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py deleted file mode 100644 index b21890c48..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py deleted file mode 100644 index df8c13619..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 7fef4856e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py deleted file mode 100644 index 97b264f0d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py deleted file mode 100644 index 218283dca..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index ce387660e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/__init__.py deleted file mode 100644 index 5dbea3946..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tiebreaker -class tiebreakers(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/tiebreakers. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of tiebreakers. - """ - __slots__ = ('_path_helper', '_extmethods', '__tiebreaker',) - - _yang_name = 'tiebreakers' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'tiebreakers'] - - def _get_tiebreaker(self): - """ - Getter method for tiebreaker, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker (list) - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - return self.__tiebreaker - - def _set_tiebreaker(self, v, load=False): - """ - Setter method for tiebreaker, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreaker is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreaker() directly. - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreaker must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__tiebreaker = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreaker(self): - self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - tiebreaker = __builtin__.property(_get_tiebreaker, _set_tiebreaker) - - __choices__ = {'algorithm': {'metric': ['tiebreaker']}} - _pyangbind_elements = OrderedDict([('tiebreaker', tiebreaker), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/__init__.py deleted file mode 100644 index 6c879cb00..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/__init__.py +++ /dev/null @@ -1,122 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tiebreaker(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/tiebreakers/tiebreaker. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - __slots__ = ('_path_helper', '_extmethods', '__tiebreaker_type',) - - _yang_name = 'tiebreaker' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'tiebreakers', 'tiebreaker'] - - def _get_tiebreaker_type(self): - """ - Getter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) - - YANG Description: Identifies an entry in the list of tiebreakers. - """ - return self.__tiebreaker_type - - def _set_tiebreaker_type(self, v, load=False): - """ - Setter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreaker_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreaker_type() directly. - - YANG Description: Identifies an entry in the list of tiebreakers. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreaker_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tiebreaker_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreaker_type(self): - self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - tiebreaker_type = __builtin__.property(_get_tiebreaker_type, _set_tiebreaker_type) - - __choices__ = {'algorithm': {'metric': ['tiebreaker_type']}} - _pyangbind_elements = OrderedDict([('tiebreaker_type', tiebreaker_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py deleted file mode 100644 index f737852bf..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py +++ /dev/null @@ -1,523 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -from . import path_metric_bounds -from . import path_affinities_values -from . import path_affinity_names -from . import path_srlgs_lists -from . import path_srlgs_names -class path_constraints(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE named path constraints container. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth','__link_protection','__setup_priority','__hold_priority','__signaling_type','__path_metric_bounds','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__disjointness',) - - _yang_name = 'path-constraints' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints'] - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_link_protection(self): - """ - Getter method for link_protection, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/link_protection (identityref) - - YANG Description: Link protection type required for the links included -in the computed path. - """ - return self.__link_protection - - def _set_link_protection(self, v, load=False): - """ - Setter method for link_protection, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/link_protection (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_protection is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_protection() directly. - - YANG Description: Link protection type required for the links included -in the computed path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_protection must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__link_protection = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_protection(self): - self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_setup_priority(self): - """ - Getter method for setup_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/setup_priority (uint8) - - YANG Description: TE LSP requested setup priority. - """ - return self.__setup_priority - - def _set_setup_priority(self, v, load=False): - """ - Setter method for setup_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/setup_priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_setup_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_setup_priority() directly. - - YANG Description: TE LSP requested setup priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """setup_priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__setup_priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_setup_priority(self): - self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_hold_priority(self): - """ - Getter method for hold_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/hold_priority (uint8) - - YANG Description: TE LSP requested hold priority. - """ - return self.__hold_priority - - def _set_hold_priority(self, v, load=False): - """ - Setter method for hold_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/hold_priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_hold_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hold_priority() directly. - - YANG Description: TE LSP requested hold priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hold_priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__hold_priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_hold_priority(self): - self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_signaling_type(self): - """ - Getter method for signaling_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/signaling_type (identityref) - - YANG Description: TE tunnel path signaling type. - """ - return self.__signaling_type - - def _set_signaling_type(self, v, load=False): - """ - Setter method for signaling_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/signaling_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_signaling_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_signaling_type() directly. - - YANG Description: TE tunnel path signaling type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """signaling_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__signaling_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_signaling_type(self): - self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_path_metric_bounds(self): - """ - Getter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds (container) - - YANG Description: TE path metric bounds container. - """ - return self.__path_metric_bounds - - def _set_path_metric_bounds(self, v, load=False): - """ - Setter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric_bounds is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric_bounds() directly. - - YANG Description: TE path metric bounds container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric_bounds must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_metric_bounds = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric_bounds(self): - self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_affinities_values(self): - """ - Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values (container) - - YANG Description: Path affinities represented as values. - """ - return self.__path_affinities_values - - def _set_path_affinities_values(self, v, load=False): - """ - Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_values() directly. - - YANG Description: Path affinities represented as values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_values must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_affinities_values = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_values(self): - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_affinity_names(self): - """ - Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names (container) - - YANG Description: Path affinities represented as names. - """ - return self.__path_affinity_names - - def _set_path_affinity_names(self, v, load=False): - """ - Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_names() directly. - - YANG Description: Path affinities represented as names. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_affinity_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_names(self): - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_srlgs_lists(self): - """ - Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists (container) - - YANG Description: Path SRLG properties container. - """ - return self.__path_srlgs_lists - - def _set_path_srlgs_lists(self, v, load=False): - """ - Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_lists is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_lists() directly. - - YANG Description: Path SRLG properties container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_lists must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_srlgs_lists = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_lists(self): - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_srlgs_names(self): - """ - Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names (container) - - YANG Description: Container for the list of named SRLGs. - """ - return self.__path_srlgs_names - - def _set_path_srlgs_names(self, v, load=False): - """ - Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_names() directly. - - YANG Description: Container for the list of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_srlgs_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_names(self): - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_disjointness(self): - """ - Getter method for disjointness, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/disjointness (te-path-disjointness) - - YANG Description: The type of resource disjointness. -When configured for a primary path, the disjointness level -applies to all secondary LSPs. When configured for a -secondary path, the disjointness level overrides the level -configured for the primary path. - """ - return self.__disjointness - - def _set_disjointness(self, v, load=False): - """ - Setter method for disjointness, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/disjointness (te-path-disjointness) - If this variable is read-only (config: false) in the - source YANG file, then _set_disjointness is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_disjointness() directly. - - YANG Description: The type of resource disjointness. -When configured for a primary path, the disjointness level -applies to all secondary LSPs. When configured for a -secondary path, the disjointness level overrides the level -configured for the primary path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """disjointness must be of a type compatible with te-path-disjointness""", - 'defined-type': "ietf-te-topology:te-path-disjointness", - 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True)""", - }) - - self.__disjointness = t - if hasattr(self, '_set'): - self._set() - - def _unset_disjointness(self): - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) - - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - link_protection = __builtin__.property(_get_link_protection, _set_link_protection) - setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority) - hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority) - signaling_type = __builtin__.property(_get_signaling_type, _set_signaling_type) - path_metric_bounds = __builtin__.property(_get_path_metric_bounds, _set_path_metric_bounds) - path_affinities_values = __builtin__.property(_get_path_affinities_values, _set_path_affinities_values) - path_affinity_names = __builtin__.property(_get_path_affinity_names, _set_path_affinity_names) - path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists, _set_path_srlgs_lists) - path_srlgs_names = __builtin__.property(_get_path_srlgs_names, _set_path_srlgs_names) - disjointness = __builtin__.property(_get_disjointness, _set_disjointness) - - - _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ('link_protection', link_protection), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('signaling_type', signaling_type), ('path_metric_bounds', path_metric_bounds), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('disjointness', disjointness), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py deleted file mode 100644 index 9e3265c07..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinities_value -class path_affinities_values(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-affinities-values. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as values. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) - - _yang_name = 'path-affinities-values' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-affinities-values'] - - def _get_path_affinities_value(self): - """ - Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinities_value - - def _set_path_affinities_value(self, v, load=False): - """ - Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_value() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_value must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_affinities_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_value(self): - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_affinities_value = __builtin__.property(_get_path_affinities_value, _set_path_affinities_value) - - - _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py deleted file mode 100644 index 8d6c0465d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_affinities_value(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-affinities-values/path-affinities-value. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) - - _yang_name = 'path-affinities-value' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-affinities-values', 'path-affinities-value'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) - - YANG Description: The affinity value. The default is empty. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: The affinity value. The default is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with admin-groups""", - 'defined-type': "ietf-te-topology:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - value = __builtin__.property(_get_value, _set_value) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py deleted file mode 100644 index 93c042152..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinity_name -class path_affinity_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-affinity-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as names. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) - - _yang_name = 'path-affinity-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-affinity-names'] - - def _get_path_affinity_name(self): - """ - Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinity_name - - def _set_path_affinity_name(self, v, load=False): - """ - Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_name() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_name(self): - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_affinity_name = __builtin__.property(_get_path_affinity_name, _set_path_affinity_name) - - - _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py deleted file mode 100644 index 8f1e02095..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import affinity_name -class path_affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-affinity-names/path-affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) - - _yang_name = 'path-affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-affinity-names', 'path-affinity-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_affinity_name(self): - """ - Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) - - YANG Description: List of named affinities. - """ - return self.__affinity_name - - def _set_affinity_name(self, v, load=False): - """ - Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_affinity_name() directly. - - YANG Description: List of named affinities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_affinity_name(self): - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - affinity_name = __builtin__.property(_get_affinity_name, _set_affinity_name) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py deleted file mode 100644 index 84a532259..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-affinity-names/path-affinity-name/affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinities. - """ - __slots__ = ('_path_helper', '_extmethods', '__name',) - - _yang_name = 'affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) - - YANG Description: Identifies a named affinity entry. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Identifies a named affinity entry. - """ - 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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - name = __builtin__.property(_get_name, _set_name) - - - _pyangbind_elements = OrderedDict([('name', name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py deleted file mode 100644 index 62154c4c0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_metric_bound -class path_metric_bounds(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-metric-bounds. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric bounds container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound',) - - _yang_name = 'path-metric-bounds' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-metric-bounds'] - - def _get_path_metric_bound(self): - """ - Getter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound (list) - - YANG Description: List of TE path metric bounds. - """ - return self.__path_metric_bound - - def _set_path_metric_bound(self, v, load=False): - """ - Setter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric_bound is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric_bound() directly. - - YANG Description: List of TE path metric bounds. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric_bound must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_metric_bound = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric_bound(self): - self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_metric_bound = __builtin__.property(_get_path_metric_bound, _set_path_metric_bound) - - - _pyangbind_elements = OrderedDict([('path_metric_bound', path_metric_bound), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py deleted file mode 100644 index 61dd53dff..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py +++ /dev/null @@ -1,165 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_metric_bound(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-metric-bounds/path-metric-bound. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of TE path metric bounds. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__upper_bound',) - - _yang_name = 'path-metric-bound' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-metric-bounds', 'path-metric-bound'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) - - YANG Description: Identifies an entry in the list of 'metric-type' items -bound for the TE path. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: Identifies an entry in the list of 'metric-type' items -bound for the TE path. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_upper_bound(self): - """ - Getter method for upper_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) - - YANG Description: Upper bound on the end-to-end TE path metric. A zero -indicates an unbounded upper limit for the specific -'metric-type'. - """ - return self.__upper_bound - - def _set_upper_bound(self, v, load=False): - """ - Setter method for upper_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_upper_bound is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_upper_bound() directly. - - YANG Description: Upper bound on the end-to-end TE path metric. A zero -indicates an unbounded upper limit for the specific -'metric-type'. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """upper_bound must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__upper_bound = t - if hasattr(self, '_set'): - self._set() - - def _unset_upper_bound(self): - self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - - metric_type = __builtin__.property(_get_metric_type, _set_metric_type) - upper_bound = __builtin__.property(_get_upper_bound, _set_upper_bound) - - - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('upper_bound', upper_bound), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py deleted file mode 100644 index 28e1d8c74..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_list -class path_srlgs_lists(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-srlgs-lists. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path SRLG properties container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) - - _yang_name = 'path-srlgs-lists' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-srlgs-lists'] - - def _get_path_srlgs_list(self): - """ - Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list (list) - - YANG Description: List of SRLG values to be included or excluded. - """ - return self.__path_srlgs_list - - def _set_path_srlgs_list(self, v, load=False): - """ - Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_list() directly. - - YANG Description: List of SRLG values to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_list must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_srlgs_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_list(self): - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_srlgs_list = __builtin__.property(_get_path_srlgs_list, _set_path_srlgs_list) - - - _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py deleted file mode 100644 index a41c502db..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_list(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-srlgs-lists/path-srlgs-list. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of SRLG values to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) - - _yang_name = 'path-srlgs-list' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-srlgs-lists', 'path-srlgs-list'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_values(self): - """ - Getter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) - - YANG Description: List of SRLG values. - """ - return self.__values - - def _set_values(self, v, load=False): - """ - Setter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_values() directly. - - YANG Description: List of SRLG values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """values must be of a type compatible with srlg""", - 'defined-type': "ietf-te-topology:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True)""", - }) - - self.__values = t - if hasattr(self, '_set'): - self._set() - - def _unset_values(self): - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - values = __builtin__.property(_get_values, _set_values) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py deleted file mode 100644 index 964651c73..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_name -class path_srlgs_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-srlgs-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of named SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) - - _yang_name = 'path-srlgs-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-srlgs-names'] - - def _get_path_srlgs_name(self): - """ - Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name (list) - - YANG Description: List of named SRLGs to be included or excluded. - """ - return self.__path_srlgs_name - - def _set_path_srlgs_name(self, v, load=False): - """ - Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_name() directly. - - YANG Description: List of named SRLGs to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_srlgs_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_name(self): - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_srlgs_name = __builtin__.property(_get_path_srlgs_name, _set_path_srlgs_name) - - - _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py deleted file mode 100644 index 2ae4647f9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-srlgs-names/path-srlgs-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named SRLGs to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) - - _yang_name = 'path-srlgs-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-srlgs-names', 'path-srlgs-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_names(self): - """ - Getter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/names (string) - - YANG Description: List of named SRLGs. - """ - return self.__names - - def _set_names(self, v, load=False): - """ - Setter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/names (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_names() directly. - - YANG Description: List of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """names must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__names = t - if hasattr(self, '_set'): - self._set() - - def _unset_names(self): - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - names = __builtin__.property(_get_names, _set_names) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py deleted file mode 100644 index 9d086807a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/__init__.py deleted file mode 100644 index 8edd4ebde..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - - - def _get_odtu_flex_type(self): - """ - Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -set up along the underlay path of this OTN Local -Link Connectivyt entry. - """ - return self.__odtu_flex_type - - def _set_odtu_flex_type(self, v, load=False): - """ - Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_odtu_flex_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odtu_flex_type() directly. - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -set up along the underlay path of this OTN Local -Link Connectivyt entry. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", - 'defined-type': "l1-types:odtu-flex-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", - }) - - self.__odtu_flex_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odtu_flex_type(self): - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - - odulist = __builtin__.property(_get_odulist, _set_odulist) - odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) - - __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} - _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index 22a8a8f85..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - number = __builtin__.property(_get_number, _set_number) - ts_number = __builtin__.property(_get_ts_number, _set_ts_number) - - __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py deleted file mode 100644 index 8d881474f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py +++ /dev/null @@ -1,318 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_metric -from . import path_affinities_values -from . import path_affinity_names -from . import path_srlgs_lists -from . import path_srlgs_names -from . import path_route_objects -class path_properties(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The TE path properties. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_metric','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__path_route_objects',) - - _yang_name = 'path-properties' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties'] - - def _get_path_metric(self): - """ - Getter method for path_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric (list) - - YANG Description: TE path metric type. - """ - return self.__path_metric - - def _set_path_metric(self, v, load=False): - """ - Setter method for path_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric() directly. - - YANG Description: TE path metric type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric(self): - self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_path_affinities_values(self): - """ - Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values (container) - - YANG Description: Path affinities represented as values. - """ - return self.__path_affinities_values - - def _set_path_affinities_values(self, v, load=False): - """ - Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_values() directly. - - YANG Description: Path affinities represented as values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_values must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinities_values = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_values(self): - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_affinity_names(self): - """ - Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names (container) - - YANG Description: Path affinities represented as names. - """ - return self.__path_affinity_names - - def _set_path_affinity_names(self, v, load=False): - """ - Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_names() directly. - - YANG Description: Path affinities represented as names. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinity_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_names(self): - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_lists(self): - """ - Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists (container) - - YANG Description: Path SRLG properties container. - """ - return self.__path_srlgs_lists - - def _set_path_srlgs_lists(self, v, load=False): - """ - Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_lists is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_lists() directly. - - YANG Description: Path SRLG properties container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_lists must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_lists = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_lists(self): - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_names(self): - """ - Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names (container) - - YANG Description: Container for the list of named SRLGs. - """ - return self.__path_srlgs_names - - def _set_path_srlgs_names(self, v, load=False): - """ - Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_names() directly. - - YANG Description: Container for the list of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_names(self): - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_route_objects(self): - """ - Getter method for path_route_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects (container) - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - return self.__path_route_objects - - def _set_path_route_objects(self, v, load=False): - """ - Setter method for path_route_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_route_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_route_objects() directly. - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_route_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_route_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_route_objects(self): - self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - path_metric = __builtin__.property(_get_path_metric) - path_affinities_values = __builtin__.property(_get_path_affinities_values) - path_affinity_names = __builtin__.property(_get_path_affinity_names) - path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) - path_srlgs_names = __builtin__.property(_get_path_srlgs_names) - path_route_objects = __builtin__.property(_get_path_route_objects) - - - _pyangbind_elements = OrderedDict([('path_metric', path_metric), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('path_route_objects', path_route_objects), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py deleted file mode 100644 index 3384b6a42..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinities_value -class path_affinities_values(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-affinities-values. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as values. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) - - _yang_name = 'path-affinities-values' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-affinities-values'] - - def _get_path_affinities_value(self): - """ - Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinities_value - - def _set_path_affinities_value(self, v, load=False): - """ - Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_value() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_value must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinities_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_value(self): - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinities_value = __builtin__.property(_get_path_affinities_value) - - - _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py deleted file mode 100644 index 626f7d240..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_affinities_value(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-affinities-values/path-affinities-value. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) - - _yang_name = 'path-affinities-value' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-affinities-values', 'path-affinities-value'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/usage (identityref) - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) - - YANG Description: The affinity value. The default is empty. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: The affinity value. The default is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with admin-groups""", - 'defined-type': "ietf-te-topology:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - - usage = __builtin__.property(_get_usage) - value = __builtin__.property(_get_value) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py deleted file mode 100644 index 3fc26577e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinity_name -class path_affinity_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-affinity-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as names. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) - - _yang_name = 'path-affinity-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-affinity-names'] - - def _get_path_affinity_name(self): - """ - Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinity_name - - def _set_path_affinity_name(self, v, load=False): - """ - Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_name() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_name(self): - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinity_name = __builtin__.property(_get_path_affinity_name) - - - _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py deleted file mode 100644 index 63035d44d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import affinity_name -class path_affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-affinity-names/path-affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) - - _yang_name = 'path-affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-affinity-names', 'path-affinity-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/usage (identityref) - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_affinity_name(self): - """ - Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) - - YANG Description: List of named affinities. - """ - return self.__affinity_name - - def _set_affinity_name(self, v, load=False): - """ - Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_affinity_name() directly. - - YANG Description: List of named affinities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_affinity_name(self): - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - usage = __builtin__.property(_get_usage) - affinity_name = __builtin__.property(_get_affinity_name) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py deleted file mode 100644 index 42383ee4d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-affinity-names/path-affinity-name/affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinities. - """ - __slots__ = ('_path_helper', '_extmethods', '__name',) - - _yang_name = 'affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) - - YANG Description: Identifies a named affinity entry. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Identifies a named affinity entry. - """ - 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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - name = __builtin__.property(_get_name) - - - _pyangbind_elements = OrderedDict([('name', name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py deleted file mode 100644 index 5a283282d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py +++ /dev/null @@ -1,159 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_metric(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-metric. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric type. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__accumulative_value',) - - _yang_name = 'path-metric' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-metric'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/metric_type (identityref) - - YANG Description: TE path metric type. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: TE path metric type. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_accumulative_value(self): - """ - Getter method for accumulative_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/accumulative_value (uint64) - - YANG Description: TE path metric accumulative value. - """ - return self.__accumulative_value - - def _set_accumulative_value(self, v, load=False): - """ - Setter method for accumulative_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/accumulative_value (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_accumulative_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_accumulative_value() directly. - - YANG Description: TE path metric accumulative value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """accumulative_value must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__accumulative_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_accumulative_value(self): - self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - - metric_type = __builtin__.property(_get_metric_type) - accumulative_value = __builtin__.property(_get_accumulative_value) - - - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('accumulative_value', accumulative_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py deleted file mode 100644 index 425ac19d0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_route_object -class path_route_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_route_object',) - - _yang_name = 'path-route-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects'] - - def _get_path_route_object(self): - """ - Getter method for path_route_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object (list) - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - return self.__path_route_object - - def _set_path_route_object(self, v, load=False): - """ - Setter method for path_route_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_route_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_route_object() directly. - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_route_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_route_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_route_object(self): - self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_route_object = __builtin__.property(_get_path_route_object) - - - _pyangbind_elements = OrderedDict([('path_route_object', path_route_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py deleted file mode 100644 index abb7aee29..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py +++ /dev/null @@ -1,327 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_route_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-route-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key -values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key -values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - index = __builtin__.property(_get_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py deleted file mode 100644 index b3d293b83..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/__init__.py deleted file mode 100644 index 10f4a55b7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py deleted file mode 100644 index 8764e4794..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 25a5ec822..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py deleted file mode 100644 index 7f9882c11..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py deleted file mode 100644 index c406a2f54..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index c965f3ce1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py deleted file mode 100644 index db6b557eb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_list -class path_srlgs_lists(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-srlgs-lists. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path SRLG properties container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) - - _yang_name = 'path-srlgs-lists' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-srlgs-lists'] - - def _get_path_srlgs_list(self): - """ - Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list (list) - - YANG Description: List of SRLG values to be included or excluded. - """ - return self.__path_srlgs_list - - def _set_path_srlgs_list(self, v, load=False): - """ - Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_list() directly. - - YANG Description: List of SRLG values to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_list must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_list(self): - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_list = __builtin__.property(_get_path_srlgs_list) - - - _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py deleted file mode 100644 index 909764a6d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_list(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-srlgs-lists/path-srlgs-list. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of SRLG values to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) - - _yang_name = 'path-srlgs-list' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-srlgs-lists', 'path-srlgs-list'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_values(self): - """ - Getter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) - - YANG Description: List of SRLG values. - """ - return self.__values - - def _set_values(self, v, load=False): - """ - Setter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_values() directly. - - YANG Description: List of SRLG values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """values must be of a type compatible with srlg""", - 'defined-type': "ietf-te-topology:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", - }) - - self.__values = t - if hasattr(self, '_set'): - self._set() - - def _unset_values(self): - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - - usage = __builtin__.property(_get_usage) - values = __builtin__.property(_get_values) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py deleted file mode 100644 index 7466c4918..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_name -class path_srlgs_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-srlgs-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of named SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) - - _yang_name = 'path-srlgs-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-srlgs-names'] - - def _get_path_srlgs_name(self): - """ - Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name (list) - - YANG Description: List of named SRLGs to be included or excluded. - """ - return self.__path_srlgs_name - - def _set_path_srlgs_name(self, v, load=False): - """ - Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_name() directly. - - YANG Description: List of named SRLGs to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_name(self): - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_name = __builtin__.property(_get_path_srlgs_name) - - - _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py deleted file mode 100644 index 75f5ea586..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-srlgs-names/path-srlgs-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named SRLGs to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) - - _yang_name = 'path-srlgs-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-srlgs-names', 'path-srlgs-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_names(self): - """ - Getter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/names (string) - - YANG Description: List of named SRLGs. - """ - return self.__names - - def _set_names(self, v, load=False): - """ - Setter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/names (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_names() directly. - - YANG Description: List of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """names must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__names = t - if hasattr(self, '_set'): - self._set() - - def _unset_names(self): - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - usage = __builtin__.property(_get_usage) - names = __builtin__.property(_get_names) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py deleted file mode 100644 index e4c8bb6d3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py +++ /dev/null @@ -1,326 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import primary_path -from . import backup_path -from . import tunnel_termination_points -from . import tunnels -class underlay(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Attributes of the TE link underlay. - """ - __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) - - _yang_name = 'underlay' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay'] - - def _get_enabled(self): - """ - Getter method for enabled, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/enabled (boolean) - - YANG Description: 'true' if the underlay is enabled. -'false' if the underlay is disabled. - """ - return self.__enabled - - def _set_enabled(self, v, load=False): - """ - Setter method for enabled, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/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: 'true' if the underlay is enabled. -'false' if the underlay is 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_primary_path(self): - """ - Getter method for primary_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path (container) - - YANG Description: The service path on the underlay topology that -supports this link. - """ - return self.__primary_path - - def _set_primary_path(self, v, load=False): - """ - Setter method for primary_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_primary_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_primary_path() directly. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """primary_path must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__primary_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_primary_path(self): - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_backup_path(self): - """ - Getter method for backup_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path (list) - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - return self.__backup_path - - def _set_backup_path(self, v, load=False): - """ - Setter method for backup_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_backup_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_backup_path() directly. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """backup_path must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__backup_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_backup_path(self): - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_protection_type(self): - """ - Getter method for protection_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/protection_type (identityref) - - YANG Description: Underlay protection type desired for this link. - """ - return self.__protection_type - - def _set_protection_type(self, v, load=False): - """ - Setter method for protection_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/protection_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_protection_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_protection_type() directly. - - YANG Description: Underlay protection type desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """protection_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__protection_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_protection_type(self): - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_tunnel_termination_points(self): - """ - Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points (container) - - YANG Description: Underlay TTPs desired for this link. - """ - return self.__tunnel_termination_points - - def _set_tunnel_termination_points(self, v, load=False): - """ - Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_termination_points is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_termination_points() directly. - - YANG Description: Underlay TTPs desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_termination_points must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tunnel_termination_points = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_termination_points(self): - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_tunnels(self): - """ - Getter method for tunnels, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels (container) - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - return self.__tunnels - - def _set_tunnels(self, v, load=False): - """ - Setter method for tunnels, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnels is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnels() directly. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnels must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tunnels = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnels(self): - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - enabled = __builtin__.property(_get_enabled, _set_enabled) - primary_path = __builtin__.property(_get_primary_path, _set_primary_path) - backup_path = __builtin__.property(_get_backup_path, _set_backup_path) - protection_type = __builtin__.property(_get_protection_type, _set_protection_type) - tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points, _set_tunnel_termination_points) - tunnels = __builtin__.property(_get_tunnels, _set_tunnels) - - - _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py deleted file mode 100644 index f9690f938..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py +++ /dev/null @@ -1,207 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class backup_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) - - _yang_name = 'backup-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/index (uint32) - - YANG Description: A sequence number to identify a backup path. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: A sequence number to identify a backup path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element (list) - - YANG Description: A list of path elements describing the backup service -path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the backup service -path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - path_element = __builtin__.property(_get_path_element, _set_path_element) - - - _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py deleted file mode 100644 index beb298aa1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py +++ /dev/null @@ -1,321 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the backup service -path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index 60abe510b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/__init__.py deleted file mode 100644 index 5ee2330a9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index 94d9603a0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 3dfbe742a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index d9b3a906d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index e4e408039..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index 274e9473a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py deleted file mode 100644 index 56854b585..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class primary_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) - - _yang_name = 'primary-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element (list) - - YANG Description: A list of path elements describing the service path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the service path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - path_element = __builtin__.property(_get_path_element, _set_path_element) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py deleted file mode 100644 index f54312b46..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py +++ /dev/null @@ -1,320 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the service path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index 013370a26..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/__init__.py deleted file mode 100644 index 1f048ca63..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index 345fd6279..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 453fa0717..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index 1e222d434..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index fdc5c1728..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index 1f41ade4f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py deleted file mode 100644 index f0ae851c1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel_termination_points(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/tunnel-termination-points. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TTPs desired for this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) - - _yang_name = 'tunnel-termination-points' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'tunnel-termination-points'] - - def _get_source(self): - """ - Getter method for source, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/source (binary) - - YANG Description: Source TTP identifier. - """ - return self.__source - - def _set_source(self, v, load=False): - """ - Setter method for source, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/source (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_source is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_source() directly. - - YANG Description: Source TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """source must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__source = t - if hasattr(self, '_set'): - self._set() - - def _unset_source(self): - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - - def _get_destination(self): - """ - Getter method for destination, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/destination (binary) - - YANG Description: Destination TTP identifier. - """ - return self.__destination - - def _set_destination(self, v, load=False): - """ - Setter method for destination, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/destination (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_destination is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_destination() directly. - - YANG Description: Destination TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """destination must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__destination = t - if hasattr(self, '_set'): - self._set() - - def _unset_destination(self): - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - source = __builtin__.property(_get_source, _set_source) - destination = __builtin__.property(_get_destination, _set_destination) - - - _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py deleted file mode 100644 index b49e97083..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py +++ /dev/null @@ -1,167 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tunnel -class tunnels(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/tunnels. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) - - _yang_name = 'tunnels' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'tunnels'] - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_tunnel(self): - """ - Getter method for tunnel, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel (list) - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - return self.__tunnel - - def _set_tunnel(self, v, load=False): - """ - Setter method for tunnel, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel() directly. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__tunnel = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel(self): - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - sharing = __builtin__.property(_get_sharing, _set_sharing) - tunnel = __builtin__.property(_get_tunnel, _set_tunnel) - - - _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py deleted file mode 100644 index bc8bc8ecb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py +++ /dev/null @@ -1,170 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/tunnels/tunnel. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) - - _yang_name = 'tunnel' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'tunnels', 'tunnel'] - - def _get_tunnel_name(self): - """ - Getter method for tunnel_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/tunnel_name (string) - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - return self.__tunnel_name - - def _set_tunnel_name(self, v, load=False): - """ - Setter method for tunnel_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/tunnel_name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_name() directly. - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - 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=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__tunnel_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_name(self): - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - tunnel_name = __builtin__.property(_get_tunnel_name, _set_tunnel_name) - sharing = __builtin__.property(_get_sharing, _set_sharing) - - - _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py deleted file mode 100644 index 5ed824918..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py +++ /dev/null @@ -1,199 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import optimization_metric -from . import tiebreakers -from . import objective_function -class optimizations(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - __slots__ = ('_path_helper', '_extmethods', '__optimization_metric','__tiebreakers','__objective_function',) - - _yang_name = 'optimizations' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations'] - - def _get_optimization_metric(self): - """ - Getter method for optimization_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric (list) - - YANG Description: TE path metric type. - """ - return self.__optimization_metric - - def _set_optimization_metric(self, v, load=False): - """ - Setter method for optimization_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_optimization_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_optimization_metric() directly. - - YANG Description: TE path metric type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """optimization_metric must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__optimization_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_optimization_metric(self): - self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_tiebreakers(self): - """ - Getter method for tiebreakers, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers (container) - - YANG Description: Container for the list of tiebreakers. - """ - return self.__tiebreakers - - def _set_tiebreakers(self, v, load=False): - """ - Setter method for tiebreakers, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreakers is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreakers() directly. - - YANG Description: Container for the list of tiebreakers. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreakers must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tiebreakers = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreakers(self): - self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_objective_function(self): - """ - Getter method for objective_function, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function (container) - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - return self.__objective_function - - def _set_objective_function(self, v, load=False): - """ - Setter method for objective_function, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_objective_function is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_objective_function() directly. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """objective_function must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__objective_function = t - if hasattr(self, '_set'): - self._set() - - def _unset_objective_function(self): - self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - optimization_metric = __builtin__.property(_get_optimization_metric, _set_optimization_metric) - tiebreakers = __builtin__.property(_get_tiebreakers, _set_tiebreakers) - objective_function = __builtin__.property(_get_objective_function, _set_objective_function) - - __choices__ = {'algorithm': {'metric': ['optimization_metric', 'tiebreakers'], 'objective-function': ['objective_function']}} - _pyangbind_elements = OrderedDict([('optimization_metric', optimization_metric), ('tiebreakers', tiebreakers), ('objective_function', objective_function), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/__init__.py deleted file mode 100644 index 3c10569db..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class objective_function(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/objective-function. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The objective function container that includes -attributes to impose when computing a TE path. - """ - __slots__ = ('_path_helper', '_extmethods', '__objective_function_type',) - - _yang_name = 'objective-function' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'objective-function'] - - def _get_objective_function_type(self): - """ - Getter method for objective_function_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/objective_function_type (identityref) - - YANG Description: Objective function entry. - """ - return self.__objective_function_type - - def _set_objective_function_type(self, v, load=False): - """ - Setter method for objective_function_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/objective_function_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_objective_function_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_objective_function_type() directly. - - YANG Description: Objective function entry. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """objective_function_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__objective_function_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_objective_function_type(self): - self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - objective_function_type = __builtin__.property(_get_objective_function_type, _set_objective_function_type) - - __choices__ = {'algorithm': {'objective-function': ['objective_function_type']}} - _pyangbind_elements = OrderedDict([('objective_function_type', objective_function_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/__init__.py deleted file mode 100644 index abb419890..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/__init__.py +++ /dev/null @@ -1,241 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import explicit_route_exclude_objects -from . import explicit_route_include_objects -class optimization_metric(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric type. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__weight','__explicit_route_exclude_objects','__explicit_route_include_objects',) - - _yang_name = 'optimization-metric' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/metric_type (identityref) - - YANG Description: Identifies the 'metric-type' that the path computation -process uses for optimization. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: Identifies the 'metric-type' that the path computation -process uses for optimization. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_weight(self): - """ - Getter method for weight, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/weight (uint8) - - YANG Description: TE path metric normalization weight. - """ - return self.__weight - - def _set_weight(self, v, load=False): - """ - Setter method for weight, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/weight (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_weight is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_weight() directly. - - YANG Description: TE path metric normalization weight. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """weight must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__weight = t - if hasattr(self, '_set'): - self._set() - - def _unset_weight(self): - self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_explicit_route_exclude_objects(self): - """ - Getter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects (container) - - YANG Description: Container for the 'exclude route' object list. - """ - return self.__explicit_route_exclude_objects - - def _set_explicit_route_exclude_objects(self, v, load=False): - """ - Setter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_explicit_route_exclude_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_explicit_route_exclude_objects() directly. - - YANG Description: Container for the 'exclude route' object list. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """explicit_route_exclude_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__explicit_route_exclude_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_explicit_route_exclude_objects(self): - self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_explicit_route_include_objects(self): - """ - Getter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects (container) - - YANG Description: Container for the 'include route' object list. - """ - return self.__explicit_route_include_objects - - def _set_explicit_route_include_objects(self, v, load=False): - """ - Setter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_explicit_route_include_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_explicit_route_include_objects() directly. - - YANG Description: Container for the 'include route' object list. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """explicit_route_include_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__explicit_route_include_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_explicit_route_include_objects(self): - self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - metric_type = __builtin__.property(_get_metric_type, _set_metric_type) - weight = __builtin__.property(_get_weight, _set_weight) - explicit_route_exclude_objects = __builtin__.property(_get_explicit_route_exclude_objects, _set_explicit_route_exclude_objects) - explicit_route_include_objects = __builtin__.property(_get_explicit_route_include_objects, _set_explicit_route_include_objects) - - __choices__ = {'algorithm': {'metric': ['metric_type', 'weight', 'explicit_route_exclude_objects', 'explicit_route_include_objects']}} - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('weight', weight), ('explicit_route_exclude_objects', explicit_route_exclude_objects), ('explicit_route_include_objects', explicit_route_include_objects), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py deleted file mode 100644 index 3831dbff9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import route_object_exclude_object -class explicit_route_exclude_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the 'exclude route' object list. - """ - __slots__ = ('_path_helper', '_extmethods', '__route_object_exclude_object',) - - _yang_name = 'explicit-route-exclude-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects'] - - def _get_route_object_exclude_object(self): - """ - Getter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - return self.__route_object_exclude_object - - def _set_route_object_exclude_object(self, v, load=False): - """ - Setter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_route_object_exclude_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_route_object_exclude_object() directly. - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """route_object_exclude_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__route_object_exclude_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_route_object_exclude_object(self): - self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - route_object_exclude_object = __builtin__.property(_get_route_object_exclude_object, _set_route_object_exclude_object) - - __choices__ = {'algorithm': {'metric': ['route_object_exclude_object']}} - _pyangbind_elements = OrderedDict([('route_object_exclude_object', route_object_exclude_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py deleted file mode 100644 index dea360b24..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py +++ /dev/null @@ -1,365 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -from . import srlg -class route_object_exclude_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of Explicit Route Objects to be excluded in the -path computation. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop','__srlg',) - - _yang_name = 'route-object-exclude-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_srlg(self): - """ - Getter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) - - YANG Description: SRLG container. - """ - return self.__srlg - - def _set_srlg(self, v, load=False): - """ - Setter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_srlg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_srlg() directly. - - YANG Description: SRLG container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """srlg must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__srlg = t - if hasattr(self, '_set'): - self._set() - - def _unset_srlg(self): - self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - srlg = __builtin__.property(_get_srlg, _set_srlg) - - __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop'], 'srlg': ['srlg']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ('srlg', srlg), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py deleted file mode 100644 index c2450591f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py deleted file mode 100644 index 05755c89d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py deleted file mode 100644 index aaf805571..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index f8e446cfb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py deleted file mode 100644 index fe5117d92..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py deleted file mode 100644 index 421eefdb3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py deleted file mode 100644 index e2dd6a91a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py +++ /dev/null @@ -1,115 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class srlg(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/srlg. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: SRLG container. - """ - __slots__ = ('_path_helper', '_extmethods', '__srlg',) - - _yang_name = 'srlg' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'srlg'] - - def _get_srlg(self): - """ - Getter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) - - YANG Description: SRLG value. - """ - return self.__srlg - - def _set_srlg(self, v, load=False): - """ - Setter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_srlg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_srlg() directly. - - YANG Description: SRLG value. - """ - 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="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """srlg 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="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__srlg = t - if hasattr(self, '_set'): - self._set() - - def _unset_srlg(self): - self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - srlg = __builtin__.property(_get_srlg, _set_srlg) - - __choices__ = {'type': {'srlg': ['srlg']}} - _pyangbind_elements = OrderedDict([('srlg', srlg), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index cd0b15cae..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/__init__.py deleted file mode 100644 index 2af5c34bd..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import route_object_include_object -class explicit_route_include_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the 'include route' object list. - """ - __slots__ = ('_path_helper', '_extmethods', '__route_object_include_object',) - - _yang_name = 'explicit-route-include-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects'] - - def _get_route_object_include_object(self): - """ - Getter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - return self.__route_object_include_object - - def _set_route_object_include_object(self, v, load=False): - """ - Setter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_route_object_include_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_route_object_include_object() directly. - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """route_object_include_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__route_object_include_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_route_object_include_object(self): - self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - route_object_include_object = __builtin__.property(_get_route_object_include_object, _set_route_object_include_object) - - __choices__ = {'algorithm': {'metric': ['route_object_include_object']}} - _pyangbind_elements = OrderedDict([('route_object_include_object', route_object_include_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py deleted file mode 100644 index 43968474b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py +++ /dev/null @@ -1,325 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class route_object_include_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of Explicit Route Objects to be included in the -path computation. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'route-object-include-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py deleted file mode 100644 index ad6d9db46..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py deleted file mode 100644 index d1ce0f206..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py deleted file mode 100644 index 66d61a6af..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 24d91aba6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py deleted file mode 100644 index bec617c3f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py deleted file mode 100644 index 6281dee5f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index 9150e2a6e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/__init__.py deleted file mode 100644 index f5a272d7f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tiebreaker -class tiebreakers(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/tiebreakers. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of tiebreakers. - """ - __slots__ = ('_path_helper', '_extmethods', '__tiebreaker',) - - _yang_name = 'tiebreakers' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'tiebreakers'] - - def _get_tiebreaker(self): - """ - Getter method for tiebreaker, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker (list) - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - return self.__tiebreaker - - def _set_tiebreaker(self, v, load=False): - """ - Setter method for tiebreaker, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreaker is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreaker() directly. - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreaker must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__tiebreaker = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreaker(self): - self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - tiebreaker = __builtin__.property(_get_tiebreaker, _set_tiebreaker) - - __choices__ = {'algorithm': {'metric': ['tiebreaker']}} - _pyangbind_elements = OrderedDict([('tiebreaker', tiebreaker), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/__init__.py deleted file mode 100644 index 2a5ad102a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/__init__.py +++ /dev/null @@ -1,122 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tiebreaker(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/tiebreakers/tiebreaker. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The list of tiebreaker criteria to apply on an -equally favored set of paths, in order to pick -the best. - """ - __slots__ = ('_path_helper', '_extmethods', '__tiebreaker_type',) - - _yang_name = 'tiebreaker' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'tiebreakers', 'tiebreaker'] - - def _get_tiebreaker_type(self): - """ - Getter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) - - YANG Description: Identifies an entry in the list of tiebreakers. - """ - return self.__tiebreaker_type - - def _set_tiebreaker_type(self, v, load=False): - """ - Setter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tiebreaker_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tiebreaker_type() directly. - - YANG Description: Identifies an entry in the list of tiebreakers. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tiebreaker_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tiebreaker_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tiebreaker_type(self): - self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - tiebreaker_type = __builtin__.property(_get_tiebreaker_type, _set_tiebreaker_type) - - __choices__ = {'algorithm': {'metric': ['tiebreaker_type']}} - _pyangbind_elements = OrderedDict([('tiebreaker_type', tiebreaker_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py deleted file mode 100644 index 995e60b8b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py +++ /dev/null @@ -1,523 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -from . import path_metric_bounds -from . import path_affinities_values -from . import path_affinity_names -from . import path_srlgs_lists -from . import path_srlgs_names -class path_constraints(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE named path constraints container. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth','__link_protection','__setup_priority','__hold_priority','__signaling_type','__path_metric_bounds','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__disjointness',) - - _yang_name = 'path-constraints' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints'] - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_link_protection(self): - """ - Getter method for link_protection, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/link_protection (identityref) - - YANG Description: Link protection type required for the links included -in the computed path. - """ - return self.__link_protection - - def _set_link_protection(self, v, load=False): - """ - Setter method for link_protection, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/link_protection (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_protection is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_protection() directly. - - YANG Description: Link protection type required for the links included -in the computed path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_protection must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__link_protection = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_protection(self): - self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_setup_priority(self): - """ - Getter method for setup_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/setup_priority (uint8) - - YANG Description: TE LSP requested setup priority. - """ - return self.__setup_priority - - def _set_setup_priority(self, v, load=False): - """ - Setter method for setup_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/setup_priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_setup_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_setup_priority() directly. - - YANG Description: TE LSP requested setup priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """setup_priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__setup_priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_setup_priority(self): - self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_hold_priority(self): - """ - Getter method for hold_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/hold_priority (uint8) - - YANG Description: TE LSP requested hold priority. - """ - return self.__hold_priority - - def _set_hold_priority(self, v, load=False): - """ - Setter method for hold_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/hold_priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_hold_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hold_priority() directly. - - YANG Description: TE LSP requested hold priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hold_priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__hold_priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_hold_priority(self): - self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_signaling_type(self): - """ - Getter method for signaling_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/signaling_type (identityref) - - YANG Description: TE tunnel path signaling type. - """ - return self.__signaling_type - - def _set_signaling_type(self, v, load=False): - """ - Setter method for signaling_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/signaling_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_signaling_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_signaling_type() directly. - - YANG Description: TE tunnel path signaling type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """signaling_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__signaling_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_signaling_type(self): - self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_path_metric_bounds(self): - """ - Getter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds (container) - - YANG Description: TE path metric bounds container. - """ - return self.__path_metric_bounds - - def _set_path_metric_bounds(self, v, load=False): - """ - Setter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric_bounds is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric_bounds() directly. - - YANG Description: TE path metric bounds container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric_bounds must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_metric_bounds = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric_bounds(self): - self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_affinities_values(self): - """ - Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values (container) - - YANG Description: Path affinities represented as values. - """ - return self.__path_affinities_values - - def _set_path_affinities_values(self, v, load=False): - """ - Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_values() directly. - - YANG Description: Path affinities represented as values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_values must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_affinities_values = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_values(self): - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_affinity_names(self): - """ - Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names (container) - - YANG Description: Path affinities represented as names. - """ - return self.__path_affinity_names - - def _set_path_affinity_names(self, v, load=False): - """ - Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_names() directly. - - YANG Description: Path affinities represented as names. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_affinity_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_names(self): - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_srlgs_lists(self): - """ - Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists (container) - - YANG Description: Path SRLG properties container. - """ - return self.__path_srlgs_lists - - def _set_path_srlgs_lists(self, v, load=False): - """ - Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_lists is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_lists() directly. - - YANG Description: Path SRLG properties container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_lists must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_srlgs_lists = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_lists(self): - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_path_srlgs_names(self): - """ - Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names (container) - - YANG Description: Container for the list of named SRLGs. - """ - return self.__path_srlgs_names - - def _set_path_srlgs_names(self, v, load=False): - """ - Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_names() directly. - - YANG Description: Container for the list of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__path_srlgs_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_names(self): - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_disjointness(self): - """ - Getter method for disjointness, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/disjointness (te-path-disjointness) - - YANG Description: The type of resource disjointness. -When configured for a primary path, the disjointness level -applies to all secondary LSPs. When configured for a -secondary path, the disjointness level overrides the level -configured for the primary path. - """ - return self.__disjointness - - def _set_disjointness(self, v, load=False): - """ - Setter method for disjointness, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/disjointness (te-path-disjointness) - If this variable is read-only (config: false) in the - source YANG file, then _set_disjointness is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_disjointness() directly. - - YANG Description: The type of resource disjointness. -When configured for a primary path, the disjointness level -applies to all secondary LSPs. When configured for a -secondary path, the disjointness level overrides the level -configured for the primary path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """disjointness must be of a type compatible with te-path-disjointness""", - 'defined-type': "ietf-te-topology:te-path-disjointness", - 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True)""", - }) - - self.__disjointness = t - if hasattr(self, '_set'): - self._set() - - def _unset_disjointness(self): - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) - - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - link_protection = __builtin__.property(_get_link_protection, _set_link_protection) - setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority) - hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority) - signaling_type = __builtin__.property(_get_signaling_type, _set_signaling_type) - path_metric_bounds = __builtin__.property(_get_path_metric_bounds, _set_path_metric_bounds) - path_affinities_values = __builtin__.property(_get_path_affinities_values, _set_path_affinities_values) - path_affinity_names = __builtin__.property(_get_path_affinity_names, _set_path_affinity_names) - path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists, _set_path_srlgs_lists) - path_srlgs_names = __builtin__.property(_get_path_srlgs_names, _set_path_srlgs_names) - disjointness = __builtin__.property(_get_disjointness, _set_disjointness) - - - _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ('link_protection', link_protection), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('signaling_type', signaling_type), ('path_metric_bounds', path_metric_bounds), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('disjointness', disjointness), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py deleted file mode 100644 index d3b86bd00..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinities_value -class path_affinities_values(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-affinities-values. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as values. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) - - _yang_name = 'path-affinities-values' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-affinities-values'] - - def _get_path_affinities_value(self): - """ - Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinities_value - - def _set_path_affinities_value(self, v, load=False): - """ - Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_value() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_value must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_affinities_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_value(self): - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_affinities_value = __builtin__.property(_get_path_affinities_value, _set_path_affinities_value) - - - _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py deleted file mode 100644 index 0d53fa7eb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_affinities_value(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-affinities-values/path-affinities-value. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) - - _yang_name = 'path-affinities-value' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-affinities-values', 'path-affinities-value'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) - - YANG Description: The affinity value. The default is empty. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: The affinity value. The default is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with admin-groups""", - 'defined-type': "ietf-te-topology:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - value = __builtin__.property(_get_value, _set_value) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py deleted file mode 100644 index 915eb1efb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinity_name -class path_affinity_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-affinity-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as names. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) - - _yang_name = 'path-affinity-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-affinity-names'] - - def _get_path_affinity_name(self): - """ - Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinity_name - - def _set_path_affinity_name(self, v, load=False): - """ - Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_name() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_name(self): - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_affinity_name = __builtin__.property(_get_path_affinity_name, _set_path_affinity_name) - - - _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py deleted file mode 100644 index f4886c5ce..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import affinity_name -class path_affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-affinity-names/path-affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) - - _yang_name = 'path-affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-affinity-names', 'path-affinity-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_affinity_name(self): - """ - Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) - - YANG Description: List of named affinities. - """ - return self.__affinity_name - - def _set_affinity_name(self, v, load=False): - """ - Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_affinity_name() directly. - - YANG Description: List of named affinities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_affinity_name(self): - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - affinity_name = __builtin__.property(_get_affinity_name, _set_affinity_name) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py deleted file mode 100644 index 2a14ea23b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-affinity-names/path-affinity-name/affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinities. - """ - __slots__ = ('_path_helper', '_extmethods', '__name',) - - _yang_name = 'affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) - - YANG Description: Identifies a named affinity entry. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Identifies a named affinity entry. - """ - 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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - name = __builtin__.property(_get_name, _set_name) - - - _pyangbind_elements = OrderedDict([('name', name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py deleted file mode 100644 index 9a35d6f91..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_metric_bound -class path_metric_bounds(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-metric-bounds. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric bounds container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound',) - - _yang_name = 'path-metric-bounds' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-metric-bounds'] - - def _get_path_metric_bound(self): - """ - Getter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound (list) - - YANG Description: List of TE path metric bounds. - """ - return self.__path_metric_bound - - def _set_path_metric_bound(self, v, load=False): - """ - Setter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric_bound is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric_bound() directly. - - YANG Description: List of TE path metric bounds. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric_bound must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_metric_bound = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric_bound(self): - self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_metric_bound = __builtin__.property(_get_path_metric_bound, _set_path_metric_bound) - - - _pyangbind_elements = OrderedDict([('path_metric_bound', path_metric_bound), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py deleted file mode 100644 index c015281ab..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py +++ /dev/null @@ -1,165 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_metric_bound(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-metric-bounds/path-metric-bound. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of TE path metric bounds. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__upper_bound',) - - _yang_name = 'path-metric-bound' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-metric-bounds', 'path-metric-bound'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) - - YANG Description: Identifies an entry in the list of 'metric-type' items -bound for the TE path. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: Identifies an entry in the list of 'metric-type' items -bound for the TE path. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_upper_bound(self): - """ - Getter method for upper_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) - - YANG Description: Upper bound on the end-to-end TE path metric. A zero -indicates an unbounded upper limit for the specific -'metric-type'. - """ - return self.__upper_bound - - def _set_upper_bound(self, v, load=False): - """ - Setter method for upper_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_upper_bound is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_upper_bound() directly. - - YANG Description: Upper bound on the end-to-end TE path metric. A zero -indicates an unbounded upper limit for the specific -'metric-type'. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """upper_bound must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__upper_bound = t - if hasattr(self, '_set'): - self._set() - - def _unset_upper_bound(self): - self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - - metric_type = __builtin__.property(_get_metric_type, _set_metric_type) - upper_bound = __builtin__.property(_get_upper_bound, _set_upper_bound) - - - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('upper_bound', upper_bound), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py deleted file mode 100644 index 1be416c5f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_list -class path_srlgs_lists(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-srlgs-lists. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path SRLG properties container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) - - _yang_name = 'path-srlgs-lists' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-srlgs-lists'] - - def _get_path_srlgs_list(self): - """ - Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list (list) - - YANG Description: List of SRLG values to be included or excluded. - """ - return self.__path_srlgs_list - - def _set_path_srlgs_list(self, v, load=False): - """ - Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_list() directly. - - YANG Description: List of SRLG values to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_list must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_srlgs_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_list(self): - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_srlgs_list = __builtin__.property(_get_path_srlgs_list, _set_path_srlgs_list) - - - _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py deleted file mode 100644 index 656884a88..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_list(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-srlgs-lists/path-srlgs-list. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of SRLG values to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) - - _yang_name = 'path-srlgs-list' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-srlgs-lists', 'path-srlgs-list'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_values(self): - """ - Getter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) - - YANG Description: List of SRLG values. - """ - return self.__values - - def _set_values(self, v, load=False): - """ - Setter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_values() directly. - - YANG Description: List of SRLG values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """values must be of a type compatible with srlg""", - 'defined-type': "ietf-te-topology:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True)""", - }) - - self.__values = t - if hasattr(self, '_set'): - self._set() - - def _unset_values(self): - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - values = __builtin__.property(_get_values, _set_values) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py deleted file mode 100644 index 0e50a196f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_name -class path_srlgs_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-srlgs-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of named SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) - - _yang_name = 'path-srlgs-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-srlgs-names'] - - def _get_path_srlgs_name(self): - """ - Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name (list) - - YANG Description: List of named SRLGs to be included or excluded. - """ - return self.__path_srlgs_name - - def _set_path_srlgs_name(self, v, load=False): - """ - Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_name() directly. - - YANG Description: List of named SRLGs to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_srlgs_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_name(self): - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - path_srlgs_name = __builtin__.property(_get_path_srlgs_name, _set_path_srlgs_name) - - - _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py deleted file mode 100644 index 4010d6485..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-srlgs-names/path-srlgs-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named SRLGs to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) - - _yang_name = 'path-srlgs-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-srlgs-names', 'path-srlgs-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_names(self): - """ - Getter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/names (string) - - YANG Description: List of named SRLGs. - """ - return self.__names - - def _set_names(self, v, load=False): - """ - Setter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/names (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_names() directly. - - YANG Description: List of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """names must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__names = t - if hasattr(self, '_set'): - self._set() - - def _unset_names(self): - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - usage = __builtin__.property(_get_usage, _set_usage) - names = __builtin__.property(_get_names, _set_names) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py deleted file mode 100644 index 82e5ccc65..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/__init__.py deleted file mode 100644 index 43c1a9a43..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - - - def _get_odtu_flex_type(self): - """ - Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -set up along the underlay paths of these OTN Local -Link Connectivities. - """ - return self.__odtu_flex_type - - def _set_odtu_flex_type(self, v, load=False): - """ - Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_odtu_flex_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odtu_flex_type() directly. - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs -set up along the underlay paths of these OTN Local -Link Connectivities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", - 'defined-type': "l1-types:odtu-flex-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", - }) - - self.__odtu_flex_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odtu_flex_type(self): - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - - odulist = __builtin__.property(_get_odulist, _set_odulist) - odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) - - __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} - _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index 637f3a83b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - number = __builtin__.property(_get_number, _set_number) - ts_number = __builtin__.property(_get_ts_number, _set_ts_number) - - __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py deleted file mode 100644 index 121cb2026..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py +++ /dev/null @@ -1,318 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_metric -from . import path_affinities_values -from . import path_affinity_names -from . import path_srlgs_lists -from . import path_srlgs_names -from . import path_route_objects -class path_properties(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The TE path properties. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_metric','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__path_route_objects',) - - _yang_name = 'path-properties' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties'] - - def _get_path_metric(self): - """ - Getter method for path_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric (list) - - YANG Description: TE path metric type. - """ - return self.__path_metric - - def _set_path_metric(self, v, load=False): - """ - Setter method for path_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_metric() directly. - - YANG Description: TE path metric type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_metric must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_metric(self): - self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - - def _get_path_affinities_values(self): - """ - Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values (container) - - YANG Description: Path affinities represented as values. - """ - return self.__path_affinities_values - - def _set_path_affinities_values(self, v, load=False): - """ - Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_values() directly. - - YANG Description: Path affinities represented as values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_values must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinities_values = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_values(self): - self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_affinity_names(self): - """ - Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names (container) - - YANG Description: Path affinities represented as names. - """ - return self.__path_affinity_names - - def _set_path_affinity_names(self, v, load=False): - """ - Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_names() directly. - - YANG Description: Path affinities represented as names. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_affinity_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_names(self): - self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_lists(self): - """ - Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists (container) - - YANG Description: Path SRLG properties container. - """ - return self.__path_srlgs_lists - - def _set_path_srlgs_lists(self, v, load=False): - """ - Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_lists is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_lists() directly. - - YANG Description: Path SRLG properties container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_lists must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_lists = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_lists(self): - self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_srlgs_names(self): - """ - Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names (container) - - YANG Description: Container for the list of named SRLGs. - """ - return self.__path_srlgs_names - - def _set_path_srlgs_names(self, v, load=False): - """ - Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_names() directly. - - YANG Description: Container for the list of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_names must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_srlgs_names = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_names(self): - self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_path_route_objects(self): - """ - Getter method for path_route_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects (container) - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - return self.__path_route_objects - - def _set_path_route_objects(self, v, load=False): - """ - Setter method for path_route_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_route_objects is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_route_objects() directly. - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_route_objects must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__path_route_objects = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_route_objects(self): - self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - path_metric = __builtin__.property(_get_path_metric) - path_affinities_values = __builtin__.property(_get_path_affinities_values) - path_affinity_names = __builtin__.property(_get_path_affinity_names) - path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) - path_srlgs_names = __builtin__.property(_get_path_srlgs_names) - path_route_objects = __builtin__.property(_get_path_route_objects) - - - _pyangbind_elements = OrderedDict([('path_metric', path_metric), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('path_route_objects', path_route_objects), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py deleted file mode 100644 index 5f23f944f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinities_value -class path_affinities_values(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-affinities-values. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as values. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) - - _yang_name = 'path-affinities-values' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-affinities-values'] - - def _get_path_affinities_value(self): - """ - Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinities_value - - def _set_path_affinities_value(self, v, load=False): - """ - Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinities_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinities_value() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinities_value must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinities_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinities_value(self): - self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinities_value = __builtin__.property(_get_path_affinities_value) - - - _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py deleted file mode 100644 index 6e7ba3ec4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_affinities_value(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-affinities-values/path-affinities-value. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) - - _yang_name = 'path-affinities-value' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-affinities-values', 'path-affinities-value'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/usage (identityref) - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of value affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) - - YANG Description: The affinity value. The default is empty. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: The affinity value. The default is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with admin-groups""", - 'defined-type': "ietf-te-topology:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) - - usage = __builtin__.property(_get_usage) - value = __builtin__.property(_get_value) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py deleted file mode 100644 index 75ec7e310..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_affinity_name -class path_affinity_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-affinity-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path affinities represented as names. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) - - _yang_name = 'path-affinity-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-affinity-names'] - - def _get_path_affinity_name(self): - """ - Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name (list) - - YANG Description: List of named affinity constraints. - """ - return self.__path_affinity_name - - def _set_path_affinity_name(self, v, load=False): - """ - Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_affinity_name() directly. - - YANG Description: List of named affinity constraints. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_affinity_name(self): - self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_affinity_name = __builtin__.property(_get_path_affinity_name) - - - _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py deleted file mode 100644 index 6d2740363..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py +++ /dev/null @@ -1,162 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import affinity_name -class path_affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-affinity-names/path-affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinity constraints. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) - - _yang_name = 'path-affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-affinity-names', 'path-affinity-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/usage (identityref) - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in the list of named affinity -constraints. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_affinity_name(self): - """ - Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) - - YANG Description: List of named affinities. - """ - return self.__affinity_name - - def _set_affinity_name(self, v, load=False): - """ - Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_affinity_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_affinity_name() directly. - - YANG Description: List of named affinities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """affinity_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__affinity_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_affinity_name(self): - self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - usage = __builtin__.property(_get_usage) - affinity_name = __builtin__.property(_get_affinity_name) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py deleted file mode 100644 index d00d8136a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class affinity_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-affinity-names/path-affinity-name/affinity-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named affinities. - """ - __slots__ = ('_path_helper', '_extmethods', '__name',) - - _yang_name = 'affinity-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) - - YANG Description: Identifies a named affinity entry. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Identifies a named affinity entry. - """ - 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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - name = __builtin__.property(_get_name) - - - _pyangbind_elements = OrderedDict([('name', name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py deleted file mode 100644 index 34ad252cf..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py +++ /dev/null @@ -1,159 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_metric(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-metric. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE path metric type. - """ - __slots__ = ('_path_helper', '_extmethods', '__metric_type','__accumulative_value',) - - _yang_name = 'path-metric' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-metric'] - - def _get_metric_type(self): - """ - Getter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/metric_type (identityref) - - YANG Description: TE path metric type. - """ - return self.__metric_type - - def _set_metric_type(self, v, load=False): - """ - Setter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/metric_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_metric_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_metric_type() directly. - - YANG Description: TE path metric type. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """metric_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__metric_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_metric_type(self): - self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_accumulative_value(self): - """ - Getter method for accumulative_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/accumulative_value (uint64) - - YANG Description: TE path metric accumulative value. - """ - return self.__accumulative_value - - def _set_accumulative_value(self, v, load=False): - """ - Setter method for accumulative_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/accumulative_value (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_accumulative_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_accumulative_value() directly. - - YANG Description: TE path metric accumulative value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """accumulative_value must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", - }) - - self.__accumulative_value = t - if hasattr(self, '_set'): - self._set() - - def _unset_accumulative_value(self): - self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) - - metric_type = __builtin__.property(_get_metric_type) - accumulative_value = __builtin__.property(_get_accumulative_value) - - - _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('accumulative_value', accumulative_value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py deleted file mode 100644 index 826eb49d2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_route_object -class path_route_objects(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of route objects either returned by -the computation engine or actually used by an LSP. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_route_object',) - - _yang_name = 'path-route-objects' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects'] - - def _get_path_route_object(self): - """ - Getter method for path_route_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object (list) - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - return self.__path_route_object - - def _set_path_route_object(self, v, load=False): - """ - Setter method for path_route_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_route_object is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_route_object() directly. - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_route_object must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_route_object = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_route_object(self): - self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_route_object = __builtin__.property(_get_path_route_object) - - - _pyangbind_elements = OrderedDict([('path_route_object', path_route_object), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py deleted file mode 100644 index 3f433dc1f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py +++ /dev/null @@ -1,327 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_route_object(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of route objects either returned by the computation -engine or actually used by an LSP. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-route-object' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/index (uint32) - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key -values. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: Route object entry index. The index is used to -identify an entry in the list. The order of entries -is defined by the user without relying on key -values. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - index = __builtin__.property(_get_index) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop) - label_hop = __builtin__.property(_get_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py deleted file mode 100644 index f8ad1dc66..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - as_number = __builtin__.property(_get_as_number) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/__init__.py deleted file mode 100644 index c577696ea..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - te_label = __builtin__.property(_get_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py deleted file mode 100644 index e8bc5dd22..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) - - generic = __builtin__.property(_get_generic) - otn = __builtin__.property(_get_otn) - vlanid = __builtin__.property(_get_vlanid) - direction = __builtin__.property(_get_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 15655b7d1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) - - tpn = __builtin__.property(_get_tpn) - tsg = __builtin__.property(_get_tsg) - ts_list = __builtin__.property(_get_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py deleted file mode 100644 index 417bcf3cf..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py deleted file mode 100644 index bef8709eb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py deleted file mode 100644 index 255ef9336..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) - - link_tp_id = __builtin__.property(_get_link_tp_id) - node_id = __builtin__.property(_get_node_id) - hop_type = __builtin__.property(_get_hop_type) - direction = __builtin__.property(_get_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py deleted file mode 100644 index ecfdfafc0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_list -class path_srlgs_lists(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-srlgs-lists. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Path SRLG properties container. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) - - _yang_name = 'path-srlgs-lists' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-srlgs-lists'] - - def _get_path_srlgs_list(self): - """ - Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list (list) - - YANG Description: List of SRLG values to be included or excluded. - """ - return self.__path_srlgs_list - - def _set_path_srlgs_list(self, v, load=False): - """ - Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_list() directly. - - YANG Description: List of SRLG values to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_list must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_list(self): - self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_list = __builtin__.property(_get_path_srlgs_list) - - - _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py deleted file mode 100644 index 14fb3f2b0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_list(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-srlgs-lists/path-srlgs-list. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of SRLG values to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) - - _yang_name = 'path-srlgs-list' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-srlgs-lists', 'path-srlgs-list'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_values(self): - """ - Getter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) - - YANG Description: List of SRLG values. - """ - return self.__values - - def _set_values(self, v, load=False): - """ - Setter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_values is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_values() directly. - - YANG Description: List of SRLG values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """values must be of a type compatible with srlg""", - 'defined-type': "ietf-te-topology:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", - }) - - self.__values = t - if hasattr(self, '_set'): - self._set() - - def _unset_values(self): - self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) - - usage = __builtin__.property(_get_usage) - values = __builtin__.property(_get_values) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py deleted file mode 100644 index 48d9f8f04..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_srlgs_name -class path_srlgs_names(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-srlgs-names. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container for the list of named SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) - - _yang_name = 'path-srlgs-names' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-srlgs-names'] - - def _get_path_srlgs_name(self): - """ - Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name (list) - - YANG Description: List of named SRLGs to be included or excluded. - """ - return self.__path_srlgs_name - - def _set_path_srlgs_name(self, v, load=False): - """ - Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_srlgs_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_srlgs_name() directly. - - YANG Description: List of named SRLGs to be included or excluded. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_srlgs_name must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", - }) - - self.__path_srlgs_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_srlgs_name(self): - self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) - - path_srlgs_name = __builtin__.property(_get_path_srlgs_name) - - - _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py deleted file mode 100644 index 874fef349..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class path_srlgs_name(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-srlgs-names/path-srlgs-name. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of named SRLGs to be included or excluded. - """ - __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) - - _yang_name = 'path-srlgs-name' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-srlgs-names', 'path-srlgs-name'] - - def _get_usage(self): - """ - Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - return self.__usage - - def _set_usage(self, v, load=False): - """ - Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_usage is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_usage() directly. - - YANG Description: Identifies an entry in a list of named SRLGs to either -include or exclude. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """usage must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", - }) - - self.__usage = t - if hasattr(self, '_set'): - self._set() - - def _unset_usage(self): - self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) - - - def _get_names(self): - """ - Getter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/names (string) - - YANG Description: List of named SRLGs. - """ - return self.__names - - def _set_names(self, v, load=False): - """ - Setter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/names (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_names is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_names() directly. - - YANG Description: List of named SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """names must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", - }) - - self.__names = t - if hasattr(self, '_set'): - self._set() - - def _unset_names(self): - self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) - - usage = __builtin__.property(_get_usage) - names = __builtin__.property(_get_names) - - - _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py deleted file mode 100644 index e1d683aeb..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py +++ /dev/null @@ -1,326 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import primary_path -from . import backup_path -from . import tunnel_termination_points -from . import tunnels -class underlay(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Attributes of the TE link underlay. - """ - __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) - - _yang_name = 'underlay' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay'] - - def _get_enabled(self): - """ - Getter method for enabled, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/enabled (boolean) - - YANG Description: 'true' if the underlay is enabled. -'false' if the underlay is disabled. - """ - return self.__enabled - - def _set_enabled(self, v, load=False): - """ - Setter method for enabled, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/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: 'true' if the underlay is enabled. -'false' if the underlay is 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_primary_path(self): - """ - Getter method for primary_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path (container) - - YANG Description: The service path on the underlay topology that -supports this link. - """ - return self.__primary_path - - def _set_primary_path(self, v, load=False): - """ - Setter method for primary_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_primary_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_primary_path() directly. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """primary_path must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__primary_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_primary_path(self): - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_backup_path(self): - """ - Getter method for backup_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path (list) - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - return self.__backup_path - - def _set_backup_path(self, v, load=False): - """ - Setter method for backup_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_backup_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_backup_path() directly. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """backup_path must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__backup_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_backup_path(self): - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_protection_type(self): - """ - Getter method for protection_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/protection_type (identityref) - - YANG Description: Underlay protection type desired for this link. - """ - return self.__protection_type - - def _set_protection_type(self, v, load=False): - """ - Setter method for protection_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/protection_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_protection_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_protection_type() directly. - - YANG Description: Underlay protection type desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """protection_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__protection_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_protection_type(self): - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_tunnel_termination_points(self): - """ - Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points (container) - - YANG Description: Underlay TTPs desired for this link. - """ - return self.__tunnel_termination_points - - def _set_tunnel_termination_points(self, v, load=False): - """ - Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_termination_points is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_termination_points() directly. - - YANG Description: Underlay TTPs desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_termination_points must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tunnel_termination_points = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_termination_points(self): - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_tunnels(self): - """ - Getter method for tunnels, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels (container) - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - return self.__tunnels - - def _set_tunnels(self, v, load=False): - """ - Setter method for tunnels, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnels is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnels() directly. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnels must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tunnels = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnels(self): - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - enabled = __builtin__.property(_get_enabled, _set_enabled) - primary_path = __builtin__.property(_get_primary_path, _set_primary_path) - backup_path = __builtin__.property(_get_backup_path, _set_backup_path) - protection_type = __builtin__.property(_get_protection_type, _set_protection_type) - tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points, _set_tunnel_termination_points) - tunnels = __builtin__.property(_get_tunnels, _set_tunnels) - - - _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py deleted file mode 100644 index 4347a263e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py +++ /dev/null @@ -1,207 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class backup_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) - - _yang_name = 'backup-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/index (uint32) - - YANG Description: A sequence number to identify a backup path. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: A sequence number to identify a backup path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element (list) - - YANG Description: A list of path elements describing the backup service -path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the backup service -path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - path_element = __builtin__.property(_get_path_element, _set_path_element) - - - _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py deleted file mode 100644 index 274232036..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py +++ /dev/null @@ -1,321 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the backup service -path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index d2bba5863..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/__init__.py deleted file mode 100644 index c46d30191..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index 7a629f62c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index f372a5fb3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index 4f7ede0ea..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index 88dac6553..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index b5a3dfc51..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py deleted file mode 100644 index bca7e6259..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class primary_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) - - _yang_name = 'primary-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element (list) - - YANG Description: A list of path elements describing the service path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the service path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - path_element = __builtin__.property(_get_path_element, _set_path_element) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py deleted file mode 100644 index 2ae1b7cb8..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py +++ /dev/null @@ -1,320 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the service path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index 68297031d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/__init__.py deleted file mode 100644 index 80afc929d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index 51e80cb34..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index bc1e9a494..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index 94bf3ca84..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index 3e3ac258c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index 0a2138b5f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py deleted file mode 100644 index 018032a5f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel_termination_points(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/tunnel-termination-points. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TTPs desired for this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) - - _yang_name = 'tunnel-termination-points' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'tunnel-termination-points'] - - def _get_source(self): - """ - Getter method for source, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/source (binary) - - YANG Description: Source TTP identifier. - """ - return self.__source - - def _set_source(self, v, load=False): - """ - Setter method for source, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/source (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_source is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_source() directly. - - YANG Description: Source TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """source must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__source = t - if hasattr(self, '_set'): - self._set() - - def _unset_source(self): - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - - def _get_destination(self): - """ - Getter method for destination, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/destination (binary) - - YANG Description: Destination TTP identifier. - """ - return self.__destination - - def _set_destination(self, v, load=False): - """ - Setter method for destination, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/destination (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_destination is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_destination() directly. - - YANG Description: Destination TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """destination must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__destination = t - if hasattr(self, '_set'): - self._set() - - def _unset_destination(self): - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - source = __builtin__.property(_get_source, _set_source) - destination = __builtin__.property(_get_destination, _set_destination) - - - _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py deleted file mode 100644 index 2ba01ce03..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py +++ /dev/null @@ -1,167 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tunnel -class tunnels(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/tunnels. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) - - _yang_name = 'tunnels' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'tunnels'] - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_tunnel(self): - """ - Getter method for tunnel, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel (list) - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - return self.__tunnel - - def _set_tunnel(self, v, load=False): - """ - Setter method for tunnel, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel() directly. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__tunnel = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel(self): - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - sharing = __builtin__.property(_get_sharing, _set_sharing) - tunnel = __builtin__.property(_get_tunnel, _set_tunnel) - - - _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py deleted file mode 100644 index ee3791127..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py +++ /dev/null @@ -1,170 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/tunnels/tunnel. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) - - _yang_name = 'tunnel' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'tunnels', 'tunnel'] - - def _get_tunnel_name(self): - """ - Getter method for tunnel_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/tunnel_name (string) - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - return self.__tunnel_name - - def _set_tunnel_name(self, v, load=False): - """ - Setter method for tunnel_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/tunnel_name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_name() directly. - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - 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=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__tunnel_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_name(self): - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - tunnel_name = __builtin__.property(_get_tunnel_name, _set_tunnel_name) - sharing = __builtin__.property(_get_sharing, _set_sharing) - - - _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py deleted file mode 100644 index f80379174..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py +++ /dev/null @@ -1,207 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tunnel_termination_point -from . import local_link_connectivity -class statistics(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/statistics. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Statistics data. - """ - __slots__ = ('_path_helper', '_extmethods', '__discontinuity_time','__tunnel_termination_point','__local_link_connectivity',) - - _yang_name = 'statistics' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__discontinuity_time = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) - self.__tunnel_termination_point = YANGDynClass(base=tunnel_termination_point.tunnel_termination_point, is_container='container', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__local_link_connectivity = YANGDynClass(base=local_link_connectivity.local_link_connectivity, is_container='container', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'statistics'] - - def _get_discontinuity_time(self): - """ - Getter method for discontinuity_time, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/discontinuity_time (yang:date-and-time) - - YANG Description: The time of the most recent occasion at which any one or -more of this interface's counters suffered a -discontinuity. If no such discontinuities have occurred -since the last re-initialization of the local management -subsystem, then this node contains the time the local -management subsystem re-initialized itself. - """ - return self.__discontinuity_time - - def _set_discontinuity_time(self, v, load=False): - """ - Setter method for discontinuity_time, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/discontinuity_time (yang:date-and-time) - If this variable is read-only (config: false) in the - source YANG file, then _set_discontinuity_time is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_discontinuity_time() directly. - - YANG Description: The time of the most recent occasion at which any one or -more of this interface's counters suffered a -discontinuity. If no such discontinuities have occurred -since the last re-initialization of the local management -subsystem, then this node contains the time the local -management subsystem re-initialized itself. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """discontinuity_time must be of a type compatible with yang:date-and-time""", - 'defined-type': "yang:date-and-time", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False)""", - }) - - self.__discontinuity_time = t - if hasattr(self, '_set'): - self._set() - - def _unset_discontinuity_time(self): - self.__discontinuity_time = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) - - - def _get_tunnel_termination_point(self): - """ - Getter method for tunnel_termination_point, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point (container) - - YANG Description: Contains statistics attributes at the TE TTP level. - """ - return self.__tunnel_termination_point - - def _set_tunnel_termination_point(self, v, load=False): - """ - Setter method for tunnel_termination_point, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_termination_point is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_termination_point() directly. - - YANG Description: Contains statistics attributes at the TE TTP level. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnel_termination_point.tunnel_termination_point, is_container='container', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_termination_point must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnel_termination_point.tunnel_termination_point, is_container='container', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__tunnel_termination_point = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_termination_point(self): - self.__tunnel_termination_point = YANGDynClass(base=tunnel_termination_point.tunnel_termination_point, is_container='container', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_local_link_connectivity(self): - """ - Getter method for local_link_connectivity, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity (container) - - YANG Description: Contains statistics attributes at the TE LLCL (Local Link -Connectivity List) level. - """ - return self.__local_link_connectivity - - def _set_local_link_connectivity(self, v, load=False): - """ - Setter method for local_link_connectivity, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_local_link_connectivity is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_local_link_connectivity() directly. - - YANG Description: Contains statistics attributes at the TE LLCL (Local Link -Connectivity List) level. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=local_link_connectivity.local_link_connectivity, is_container='container', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """local_link_connectivity must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=local_link_connectivity.local_link_connectivity, is_container='container', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__local_link_connectivity = t - if hasattr(self, '_set'): - self._set() - - def _unset_local_link_connectivity(self): - self.__local_link_connectivity = YANGDynClass(base=local_link_connectivity.local_link_connectivity, is_container='container', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - discontinuity_time = __builtin__.property(_get_discontinuity_time) - tunnel_termination_point = __builtin__.property(_get_tunnel_termination_point) - local_link_connectivity = __builtin__.property(_get_local_link_connectivity) - - - _pyangbind_elements = OrderedDict([('discontinuity_time', discontinuity_time), ('tunnel_termination_point', tunnel_termination_point), ('local_link_connectivity', local_link_connectivity), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py deleted file mode 100644 index e533bc72d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py +++ /dev/null @@ -1,272 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class local_link_connectivity(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/statistics/local-link-connectivity. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains statistics attributes at the TE LLCL (Local Link -Connectivity List) level. - """ - __slots__ = ('_path_helper', '_extmethods', '__creates','__deletes','__disables','__enables','__modifies',) - - _yang_name = 'local-link-connectivity' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__creates = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__deletes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'statistics', 'local-link-connectivity'] - - def _get_creates(self): - """ - Getter method for creates, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/creates (yang:counter32) - - YANG Description: Number of times that an LLCL entry was created. - """ - return self.__creates - - def _set_creates(self, v, load=False): - """ - Setter method for creates, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/creates (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_creates is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_creates() directly. - - YANG Description: Number of times that an LLCL entry was created. - """ - 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="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """creates must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__creates = t - if hasattr(self, '_set'): - self._set() - - def _unset_creates(self): - self.__creates = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_deletes(self): - """ - Getter method for deletes, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/deletes (yang:counter32) - - YANG Description: Number of times that an LLCL entry was deleted. - """ - return self.__deletes - - def _set_deletes(self, v, load=False): - """ - Setter method for deletes, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/deletes (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_deletes is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_deletes() directly. - - YANG Description: Number of times that an LLCL entry was deleted. - """ - 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="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """deletes must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__deletes = t - if hasattr(self, '_set'): - self._set() - - def _unset_deletes(self): - self.__deletes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_disables(self): - """ - Getter method for disables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/disables (yang:counter32) - - YANG Description: Number of times that an LLCL entry was disabled. - """ - return self.__disables - - def _set_disables(self, v, load=False): - """ - Setter method for disables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/disables (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_disables is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_disables() directly. - - YANG Description: Number of times that an LLCL entry was disabled. - """ - 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="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """disables must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__disables = t - if hasattr(self, '_set'): - self._set() - - def _unset_disables(self): - self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_enables(self): - """ - Getter method for enables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/enables (yang:counter32) - - YANG Description: Number of times that an LLCL entry was enabled. - """ - return self.__enables - - def _set_enables(self, v, load=False): - """ - Setter method for enables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/enables (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_enables is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_enables() directly. - - YANG Description: Number of times that an LLCL entry was enabled. - """ - 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="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """enables must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__enables = t - if hasattr(self, '_set'): - self._set() - - def _unset_enables(self): - self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_modifies(self): - """ - Getter method for modifies, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/modifies (yang:counter32) - - YANG Description: Number of times that an LLCL entry was modified. - """ - return self.__modifies - - def _set_modifies(self, v, load=False): - """ - Setter method for modifies, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/modifies (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_modifies is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_modifies() directly. - - YANG Description: Number of times that an LLCL entry was modified. - """ - 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="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """modifies must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__modifies = t - if hasattr(self, '_set'): - self._set() - - def _unset_modifies(self): - self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - creates = __builtin__.property(_get_creates) - deletes = __builtin__.property(_get_deletes) - disables = __builtin__.property(_get_disables) - enables = __builtin__.property(_get_enables) - modifies = __builtin__.property(_get_modifies) - - - _pyangbind_elements = OrderedDict([('creates', creates), ('deletes', deletes), ('disables', disables), ('enables', enables), ('modifies', modifies), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py deleted file mode 100644 index 7759e40dd..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py +++ /dev/null @@ -1,435 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel_termination_point(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/statistics/tunnel-termination-point. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains statistics attributes at the TE TTP level. - """ - __slots__ = ('_path_helper', '_extmethods', '__disables','__enables','__maintenance_clears','__maintenance_sets','__modifies','__downs','__ups','__in_service_clears','__in_service_sets',) - - _yang_name = 'tunnel-termination-point' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__maintenance_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__maintenance_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__downs = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__ups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__in_service_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - self.__in_service_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'statistics', 'tunnel-termination-point'] - - def _get_disables(self): - """ - Getter method for disables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/disables (yang:counter32) - - YANG Description: Number of times that a TTP was disabled. - """ - return self.__disables - - def _set_disables(self, v, load=False): - """ - Setter method for disables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/disables (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_disables is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_disables() directly. - - YANG Description: Number of times that a TTP was disabled. - """ - 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="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """disables must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__disables = t - if hasattr(self, '_set'): - self._set() - - def _unset_disables(self): - self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_enables(self): - """ - Getter method for enables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/enables (yang:counter32) - - YANG Description: Number of times that a TTP was enabled. - """ - return self.__enables - - def _set_enables(self, v, load=False): - """ - Setter method for enables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/enables (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_enables is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_enables() directly. - - YANG Description: Number of times that a TTP was enabled. - """ - 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="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """enables must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__enables = t - if hasattr(self, '_set'): - self._set() - - def _unset_enables(self): - self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_maintenance_clears(self): - """ - Getter method for maintenance_clears, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/maintenance_clears (yang:counter32) - - YANG Description: Number of times that a TTP was taken out of maintenance. - """ - return self.__maintenance_clears - - def _set_maintenance_clears(self, v, load=False): - """ - Setter method for maintenance_clears, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/maintenance_clears (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_maintenance_clears is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_maintenance_clears() directly. - - YANG Description: Number of times that a TTP was taken out of maintenance. - """ - 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="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """maintenance_clears must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__maintenance_clears = t - if hasattr(self, '_set'): - self._set() - - def _unset_maintenance_clears(self): - self.__maintenance_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_maintenance_sets(self): - """ - Getter method for maintenance_sets, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/maintenance_sets (yang:counter32) - - YANG Description: Number of times that a TTP was put in maintenance. - """ - return self.__maintenance_sets - - def _set_maintenance_sets(self, v, load=False): - """ - Setter method for maintenance_sets, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/maintenance_sets (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_maintenance_sets is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_maintenance_sets() directly. - - YANG Description: Number of times that a TTP was put in maintenance. - """ - 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="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """maintenance_sets must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__maintenance_sets = t - if hasattr(self, '_set'): - self._set() - - def _unset_maintenance_sets(self): - self.__maintenance_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_modifies(self): - """ - Getter method for modifies, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/modifies (yang:counter32) - - YANG Description: Number of times that a TTP was modified. - """ - return self.__modifies - - def _set_modifies(self, v, load=False): - """ - Setter method for modifies, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/modifies (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_modifies is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_modifies() directly. - - YANG Description: Number of times that a TTP was modified. - """ - 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="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """modifies must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__modifies = t - if hasattr(self, '_set'): - self._set() - - def _unset_modifies(self): - self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_downs(self): - """ - Getter method for downs, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/downs (yang:counter32) - - YANG Description: Number of times that a TTP was set to an operational state -of 'down'. - """ - return self.__downs - - def _set_downs(self, v, load=False): - """ - Setter method for downs, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/downs (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_downs is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_downs() directly. - - YANG Description: Number of times that a TTP was set to an operational state -of 'down'. - """ - 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="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """downs must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__downs = t - if hasattr(self, '_set'): - self._set() - - def _unset_downs(self): - self.__downs = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_ups(self): - """ - Getter method for ups, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/ups (yang:counter32) - - YANG Description: Number of times that a TTP was set to an operational state -of 'up'. - """ - return self.__ups - - def _set_ups(self, v, load=False): - """ - Setter method for ups, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/ups (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_ups is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ups() directly. - - YANG Description: Number of times that a TTP was set to an operational 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="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ups must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__ups = t - if hasattr(self, '_set'): - self._set() - - def _unset_ups(self): - self.__ups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_in_service_clears(self): - """ - Getter method for in_service_clears, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/in_service_clears (yang:counter32) - - YANG Description: Number of times that a TTP was taken out of service -(TE tunnel was released). - """ - return self.__in_service_clears - - def _set_in_service_clears(self, v, load=False): - """ - Setter method for in_service_clears, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/in_service_clears (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_in_service_clears is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_in_service_clears() directly. - - YANG Description: Number of times that a TTP was taken out of service -(TE tunnel was released). - """ - 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="in-service-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """in_service_clears must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__in_service_clears = t - if hasattr(self, '_set'): - self._set() - - def _unset_in_service_clears(self): - self.__in_service_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - - def _get_in_service_sets(self): - """ - Getter method for in_service_sets, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/in_service_sets (yang:counter32) - - YANG Description: Number of times that a TTP was put in service by a TE -tunnel (TE tunnel was set up). - """ - return self.__in_service_sets - - def _set_in_service_sets(self, v, load=False): - """ - Setter method for in_service_sets, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/in_service_sets (yang:counter32) - If this variable is read-only (config: false) in the - source YANG file, then _set_in_service_sets is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_in_service_sets() directly. - - YANG Description: Number of times that a TTP was put in service by a TE -tunnel (TE tunnel was set 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="in-service-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """in_service_sets must be of a type compatible with yang:counter32""", - 'defined-type': "yang:counter32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", - }) - - self.__in_service_sets = t - if hasattr(self, '_set'): - self._set() - - def _unset_in_service_sets(self): - self.__in_service_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) - - disables = __builtin__.property(_get_disables) - enables = __builtin__.property(_get_enables) - maintenance_clears = __builtin__.property(_get_maintenance_clears) - maintenance_sets = __builtin__.property(_get_maintenance_sets) - modifies = __builtin__.property(_get_modifies) - downs = __builtin__.property(_get_downs) - ups = __builtin__.property(_get_ups) - in_service_clears = __builtin__.property(_get_in_service_clears) - in_service_sets = __builtin__.property(_get_in_service_sets) - - - _pyangbind_elements = OrderedDict([('disables', disables), ('enables', enables), ('maintenance_clears', maintenance_clears), ('maintenance_sets', maintenance_sets), ('modifies', modifies), ('downs', downs), ('ups', ups), ('in_service_clears', in_service_clears), ('in_service_sets', in_service_sets), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py deleted file mode 100644 index 2d4ca8bff..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py +++ /dev/null @@ -1,172 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class supporting_tunnel_termination_point(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/supporting-tunnel-termination-point. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Identifies the TTPs on which this TTP depends. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_ref','__tunnel_tp_ref',) - - _yang_name = 'supporting-tunnel-termination-point' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:uri', is_config=True) - self.__tunnel_tp_ref = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', 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 ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'supporting-tunnel-termination-point'] - - def _get_node_ref(self): - """ - Getter method for node_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/node_ref (inet:uri) - - YANG Description: This leaf identifies the node in which the supporting -TTP is present. -This node is either the supporting node or a node in -an underlay topology. - """ - return self.__node_ref - - def _set_node_ref(self, v, load=False): - """ - Setter method for node_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/node_ref (inet:uri) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_ref() directly. - - YANG Description: This leaf identifies the node in which the supporting -TTP is present. -This node is either the supporting node or a node in -an underlay topology. - """ - 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=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:uri', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_ref must be of a type compatible with inet:uri""", - 'defined-type': "inet:uri", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:uri', is_config=True)""", - }) - - self.__node_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_ref(self): - self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:uri', is_config=True) - - - def _get_tunnel_tp_ref(self): - """ - Getter method for tunnel_tp_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/tunnel_tp_ref (binary) - - YANG Description: Reference to a TTP that is in either the supporting node -or a node in an underlay topology. - """ - return self.__tunnel_tp_ref - - def _set_tunnel_tp_ref(self, v, load=False): - """ - Setter method for tunnel_tp_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/tunnel_tp_ref (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_tp_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_tp_ref() directly. - - YANG Description: Reference to a TTP that is in either the supporting node -or a node in an underlay topology. - """ - 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=YANGBinary, is_leaf=True, yang_name="tunnel-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_tp_ref must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__tunnel_tp_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_tp_ref(self): - self.__tunnel_tp_ref = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - node_ref = __builtin__.property(_get_node_ref, _set_node_ref) - tunnel_tp_ref = __builtin__.property(_get_tunnel_tp_ref, _set_tunnel_tp_ref) - - - _pyangbind_elements = OrderedDict([('node_ref', node_ref), ('tunnel_tp_ref', tunnel_tp_ref), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/__init__.py deleted file mode 100644 index 1665caff1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/__init__.py +++ /dev/null @@ -1,339 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import supporting_termination_point -from . import te -from . import eth_svc -from . import eth_link_tp -class termination_point(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A termination point can terminate a link. -Depending on the type of topology, a termination point -could, for example, refer to a port or an interface. - """ - __slots__ = ('_path_helper', '_extmethods', '__tp_id','__supporting_termination_point','__te_tp_id','__te','__eth_svc','__eth_link_tp',) - - _yang_name = 'termination-point' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tp_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='tp-id', is_config=True) - self.__supporting_termination_point = YANGDynClass(base=YANGListType("network_ref node_ref tp_ref",supporting_termination_point.supporting_termination_point, yang_name="supporting-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref tp-ref', extensions=None), is_container='list', yang_name="supporting-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) - self.__te_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="te-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) - self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__eth_svc = YANGDynClass(base=eth_svc.eth_svc, is_container='container', yang_name="eth-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - self.__eth_link_tp = YANGDynClass(base=eth_link_tp.eth_link_tp, is_container='container', yang_name="eth-link-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'network', 'node', 'termination-point'] - - def _get_tp_id(self): - """ - Getter method for tp_id, mapped from YANG variable /networks/network/node/termination_point/tp_id (tp-id) - - YANG Description: Termination point identifier. - """ - return self.__tp_id - - def _set_tp_id(self, v, load=False): - """ - Setter method for tp_id, mapped from YANG variable /networks/network/node/termination_point/tp_id (tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tp_id() directly. - - YANG Description: Termination point identifier. - """ - 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=six.text_type, is_leaf=True, yang_name="tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tp_id must be of a type compatible with tp-id""", - 'defined-type': "ietf-network-topology:tp-id", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='tp-id', is_config=True)""", - }) - - self.__tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_tp_id(self): - self.__tp_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='tp-id', is_config=True) - - - def _get_supporting_termination_point(self): - """ - Getter method for supporting_termination_point, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point (list) - - YANG Description: This list identifies any termination points on which a -given termination point depends or onto which it maps. -Those termination points will themselves be contained -in a supporting node. This dependency information can be -inferred from the dependencies between links. Therefore, -this item is not separately configurable. Hence, no -corresponding constraint needs to be articulated. -The corresponding information is simply provided by the -implementing system. - """ - return self.__supporting_termination_point - - def _set_supporting_termination_point(self, v, load=False): - """ - Setter method for supporting_termination_point, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_supporting_termination_point is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_supporting_termination_point() directly. - - YANG Description: This list identifies any termination points on which a -given termination point depends or onto which it maps. -Those termination points will themselves be contained -in a supporting node. This dependency information can be -inferred from the dependencies between links. Therefore, -this item is not separately configurable. Hence, no -corresponding constraint needs to be articulated. -The corresponding information is simply provided by the -implementing system. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("network_ref node_ref tp_ref",supporting_termination_point.supporting_termination_point, yang_name="supporting-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref tp-ref', extensions=None), is_container='list', yang_name="supporting-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """supporting_termination_point must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("network_ref node_ref tp_ref",supporting_termination_point.supporting_termination_point, yang_name="supporting-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref tp-ref', extensions=None), is_container='list', yang_name="supporting-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True)""", - }) - - self.__supporting_termination_point = t - if hasattr(self, '_set'): - self._set() - - def _unset_supporting_termination_point(self): - self.__supporting_termination_point = YANGDynClass(base=YANGListType("network_ref node_ref tp_ref",supporting_termination_point.supporting_termination_point, yang_name="supporting-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref tp-ref', extensions=None), is_container='list', yang_name="supporting-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) - - - def _get_te_tp_id(self): - """ - Getter method for te_tp_id, mapped from YANG variable /networks/network/node/termination_point/te_tp_id (te-types:te-tp-id) - - YANG Description: An identifier that uniquely identifies a TE termination -point. - """ - return self.__te_tp_id - - def _set_te_tp_id(self, v, load=False): - """ - Setter method for te_tp_id, mapped from YANG variable /networks/network/node/termination_point/te_tp_id (te-types:te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_tp_id() directly. - - YANG Description: An identifier that uniquely identifies a TE termination -point. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="te-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_tp_id must be of a type compatible with te-types:te-tp-id""", - 'defined-type': "te-types:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="te-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True)""", - }) - - self.__te_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_tp_id(self): - self.__te_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="te-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) - - - def _get_te(self): - """ - Getter method for te, mapped from YANG variable /networks/network/node/termination_point/te (container) - - YANG Description: Indicates TE support. - """ - return self.__te - - def _set_te(self, v, load=False): - """ - Setter method for te, mapped from YANG variable /networks/network/node/termination_point/te (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te() directly. - - YANG Description: Indicates TE support. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te = t - if hasattr(self, '_set'): - self._set() - - def _unset_te(self): - self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_eth_svc(self): - """ - Getter method for eth_svc, mapped from YANG variable /networks/network/node/termination_point/eth_svc (container) - - YANG Description: ETH LTP Service attributes. - """ - return self.__eth_svc - - def _set_eth_svc(self, v, load=False): - """ - Setter method for eth_svc, mapped from YANG variable /networks/network/node/termination_point/eth_svc (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_svc is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_svc() directly. - - YANG Description: ETH LTP Service attributes. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=eth_svc.eth_svc, is_container='container', yang_name="eth-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_svc must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=eth_svc.eth_svc, is_container='container', yang_name="eth-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__eth_svc = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_svc(self): - self.__eth_svc = YANGDynClass(base=eth_svc.eth_svc, is_container='container', yang_name="eth-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - - def _get_eth_link_tp(self): - """ - Getter method for eth_link_tp, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp (container) - - YANG Description: Attributes of the Ethernet Link Termination Point (LTP). - """ - return self.__eth_link_tp - - def _set_eth_link_tp(self, v, load=False): - """ - Setter method for eth_link_tp, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_link_tp is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_link_tp() directly. - - YANG Description: Attributes of the Ethernet Link Termination Point (LTP). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=eth_link_tp.eth_link_tp, is_container='container', yang_name="eth-link-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_link_tp must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=eth_link_tp.eth_link_tp, is_container='container', yang_name="eth-link-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__eth_link_tp = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_link_tp(self): - self.__eth_link_tp = YANGDynClass(base=eth_link_tp.eth_link_tp, is_container='container', yang_name="eth-link-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - tp_id = __builtin__.property(_get_tp_id, _set_tp_id) - supporting_termination_point = __builtin__.property(_get_supporting_termination_point, _set_supporting_termination_point) - te_tp_id = __builtin__.property(_get_te_tp_id, _set_te_tp_id) - te = __builtin__.property(_get_te, _set_te) - eth_svc = __builtin__.property(_get_eth_svc, _set_eth_svc) - eth_link_tp = __builtin__.property(_get_eth_link_tp, _set_eth_link_tp) - - - _pyangbind_elements = OrderedDict([('tp_id', tp_id), ('supporting_termination_point', supporting_termination_point), ('te_tp_id', te_tp_id), ('te', te), ('eth_svc', eth_svc), ('eth_link_tp', eth_link_tp), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/__init__.py deleted file mode 100644 index d3de63b0f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/__init__.py +++ /dev/null @@ -1,315 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import ingress_egress_bandwidth_profile -from . import ingress_bandwidth_profile -from . import egress_bandwidth_profile -class eth_link_tp(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-link-tp. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Attributes of the Ethernet Link Termination Point (LTP). - """ - __slots__ = ('_path_helper', '_extmethods', '__ltp_mac_address','__port_vlan_id','__maximum_frame_size','__ingress_egress_bandwidth_profile','__ingress_bandwidth_profile','__egress_bandwidth_profile',) - - _yang_name = 'eth-link-tp' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__ltp_mac_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="ltp-mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='yang:mac-address', is_config=True) - self.__port_vlan_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="port-vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__maximum_frame_size = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['64 .. 65535']}), is_leaf=True, yang_name="maximum-frame-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - self.__ingress_egress_bandwidth_profile = YANGDynClass(base=ingress_egress_bandwidth_profile.ingress_egress_bandwidth_profile, is_container='container', yang_name="ingress-egress-bandwidth-profile", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - self.__ingress_bandwidth_profile = YANGDynClass(base=ingress_bandwidth_profile.ingress_bandwidth_profile, is_container='container', yang_name="ingress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - self.__egress_bandwidth_profile = YANGDynClass(base=egress_bandwidth_profile.egress_bandwidth_profile, is_container='container', yang_name="egress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'network', 'node', 'termination-point', 'eth-link-tp'] - - def _get_ltp_mac_address(self): - """ - Getter method for ltp_mac_address, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ltp_mac_address (yang:mac-address) - - YANG Description: The MAC address of the Ethernet LTP. - """ - return self.__ltp_mac_address - - def _set_ltp_mac_address(self, v, load=False): - """ - Setter method for ltp_mac_address, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ltp_mac_address (yang:mac-address) - If this variable is read-only (config: false) in the - source YANG file, then _set_ltp_mac_address is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ltp_mac_address() directly. - - YANG Description: The MAC address of the Ethernet LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="ltp-mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='yang:mac-address', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ltp_mac_address must be of a type compatible with yang:mac-address""", - 'defined-type': "yang:mac-address", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="ltp-mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='yang:mac-address', is_config=True)""", - }) - - self.__ltp_mac_address = t - if hasattr(self, '_set'): - self._set() - - def _unset_ltp_mac_address(self): - self.__ltp_mac_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="ltp-mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='yang:mac-address', is_config=True) - - - def _get_port_vlan_id(self): - """ - Getter method for port_vlan_id, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/port_vlan_id (etht-types:vlanid) - - YANG Description: The Port VLAN ID of the Ethernet LTP. - """ - return self.__port_vlan_id - - def _set_port_vlan_id(self, v, load=False): - """ - Setter method for port_vlan_id, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/port_vlan_id (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_port_vlan_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_port_vlan_id() directly. - - YANG Description: The Port VLAN ID of the Ethernet LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="port-vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """port_vlan_id must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="port-vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__port_vlan_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_port_vlan_id(self): - self.__port_vlan_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="port-vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_maximum_frame_size(self): - """ - Getter method for maximum_frame_size, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/maximum_frame_size (uint16) - - YANG Description: Maximum frame size - """ - return self.__maximum_frame_size - - def _set_maximum_frame_size(self, v, load=False): - """ - Setter method for maximum_frame_size, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/maximum_frame_size (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_maximum_frame_size is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_maximum_frame_size() directly. - - YANG Description: Maximum frame size - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['64 .. 65535']}), is_leaf=True, yang_name="maximum-frame-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """maximum_frame_size must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['64 .. 65535']}), is_leaf=True, yang_name="maximum-frame-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", - }) - - self.__maximum_frame_size = t - if hasattr(self, '_set'): - self._set() - - def _unset_maximum_frame_size(self): - self.__maximum_frame_size = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['64 .. 65535']}), is_leaf=True, yang_name="maximum-frame-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - - - def _get_ingress_egress_bandwidth_profile(self): - """ - Getter method for ingress_egress_bandwidth_profile, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile (container) - - YANG Description: The bandwith profile used in the ingress and egress -direction. - """ - return self.__ingress_egress_bandwidth_profile - - def _set_ingress_egress_bandwidth_profile(self, v, load=False): - """ - Setter method for ingress_egress_bandwidth_profile, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_ingress_egress_bandwidth_profile is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ingress_egress_bandwidth_profile() directly. - - YANG Description: The bandwith profile used in the ingress and egress -direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=ingress_egress_bandwidth_profile.ingress_egress_bandwidth_profile, is_container='container', yang_name="ingress-egress-bandwidth-profile", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ingress_egress_bandwidth_profile must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=ingress_egress_bandwidth_profile.ingress_egress_bandwidth_profile, is_container='container', yang_name="ingress-egress-bandwidth-profile", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__ingress_egress_bandwidth_profile = t - if hasattr(self, '_set'): - self._set() - - def _unset_ingress_egress_bandwidth_profile(self): - self.__ingress_egress_bandwidth_profile = YANGDynClass(base=ingress_egress_bandwidth_profile.ingress_egress_bandwidth_profile, is_container='container', yang_name="ingress-egress-bandwidth-profile", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - - def _get_ingress_bandwidth_profile(self): - """ - Getter method for ingress_bandwidth_profile, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile (container) - - YANG Description: The bandwidth profile used in the ingress direction. - """ - return self.__ingress_bandwidth_profile - - def _set_ingress_bandwidth_profile(self, v, load=False): - """ - Setter method for ingress_bandwidth_profile, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_ingress_bandwidth_profile is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ingress_bandwidth_profile() directly. - - YANG Description: The bandwidth profile used in the ingress direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=ingress_bandwidth_profile.ingress_bandwidth_profile, is_container='container', yang_name="ingress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ingress_bandwidth_profile must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=ingress_bandwidth_profile.ingress_bandwidth_profile, is_container='container', yang_name="ingress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__ingress_bandwidth_profile = t - if hasattr(self, '_set'): - self._set() - - def _unset_ingress_bandwidth_profile(self): - self.__ingress_bandwidth_profile = YANGDynClass(base=ingress_bandwidth_profile.ingress_bandwidth_profile, is_container='container', yang_name="ingress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - - def _get_egress_bandwidth_profile(self): - """ - Getter method for egress_bandwidth_profile, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile (container) - - YANG Description: The bandwidth profile used in the egress direction. - """ - return self.__egress_bandwidth_profile - - def _set_egress_bandwidth_profile(self, v, load=False): - """ - Setter method for egress_bandwidth_profile, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_egress_bandwidth_profile is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_egress_bandwidth_profile() directly. - - YANG Description: The bandwidth profile used in the egress direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=egress_bandwidth_profile.egress_bandwidth_profile, is_container='container', yang_name="egress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """egress_bandwidth_profile must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=egress_bandwidth_profile.egress_bandwidth_profile, is_container='container', yang_name="egress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__egress_bandwidth_profile = t - if hasattr(self, '_set'): - self._set() - - def _unset_egress_bandwidth_profile(self): - self.__egress_bandwidth_profile = YANGDynClass(base=egress_bandwidth_profile.egress_bandwidth_profile, is_container='container', yang_name="egress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - ltp_mac_address = __builtin__.property(_get_ltp_mac_address, _set_ltp_mac_address) - port_vlan_id = __builtin__.property(_get_port_vlan_id, _set_port_vlan_id) - maximum_frame_size = __builtin__.property(_get_maximum_frame_size, _set_maximum_frame_size) - ingress_egress_bandwidth_profile = __builtin__.property(_get_ingress_egress_bandwidth_profile, _set_ingress_egress_bandwidth_profile) - ingress_bandwidth_profile = __builtin__.property(_get_ingress_bandwidth_profile, _set_ingress_bandwidth_profile) - egress_bandwidth_profile = __builtin__.property(_get_egress_bandwidth_profile, _set_egress_bandwidth_profile) - - __choices__ = {'direction': {'symmetrical': ['ingress_egress_bandwidth_profile'], 'asymmetrical': ['ingress_bandwidth_profile', 'egress_bandwidth_profile']}} - _pyangbind_elements = OrderedDict([('ltp_mac_address', ltp_mac_address), ('port_vlan_id', port_vlan_id), ('maximum_frame_size', maximum_frame_size), ('ingress_egress_bandwidth_profile', ingress_egress_bandwidth_profile), ('ingress_bandwidth_profile', ingress_bandwidth_profile), ('egress_bandwidth_profile', egress_bandwidth_profile), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/__init__.py deleted file mode 100644 index f617b9577..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/__init__.py +++ /dev/null @@ -1,355 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class egress_bandwidth_profile(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-link-tp/egress-bandwidth-profile. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The bandwidth profile used in the egress direction. - """ - __slots__ = ('_path_helper', '_extmethods', '__bandwidth_profile_type','__CIR','__CBS','__EIR','__EBS','__color_aware','__coupling_flag',) - - _yang_name = 'egress-bandwidth-profile' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__bandwidth_profile_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) - self.__CIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - self.__CBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - self.__EIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - self.__EBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - self.__color_aware = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - self.__coupling_flag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', 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 ['networks', 'network', 'node', 'termination-point', 'eth-link-tp', 'egress-bandwidth-profile'] - - def _get_bandwidth_profile_type(self): - """ - Getter method for bandwidth_profile_type, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/bandwidth_profile_type (etht-types:bandwidth-profile-type) - - YANG Description: The type of bandwidth profile. - """ - return self.__bandwidth_profile_type - - def _set_bandwidth_profile_type(self, v, load=False): - """ - Setter method for bandwidth_profile_type, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/bandwidth_profile_type (etht-types:bandwidth-profile-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_bandwidth_profile_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_bandwidth_profile_type() directly. - - YANG Description: The type of bandwidth profile. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """bandwidth_profile_type must be of a type compatible with etht-types:bandwidth-profile-type""", - 'defined-type': "etht-types:bandwidth-profile-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True)""", - }) - - self.__bandwidth_profile_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_bandwidth_profile_type(self): - self.__bandwidth_profile_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) - - - def _get_CIR(self): - """ - Getter method for CIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/CIR (uint64) - - YANG Description: Committed Information Rate in Kbps - """ - return self.__CIR - - def _set_CIR(self, v, load=False): - """ - Setter method for CIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/CIR (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_CIR is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_CIR() directly. - - YANG Description: Committed Information Rate in Kbps - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """CIR must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__CIR = t - if hasattr(self, '_set'): - self._set() - - def _unset_CIR(self): - self.__CIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - - def _get_CBS(self): - """ - Getter method for CBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/CBS (uint64) - - YANG Description: Committed Burst Size in in KBytes - """ - return self.__CBS - - def _set_CBS(self, v, load=False): - """ - Setter method for CBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/CBS (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_CBS is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_CBS() directly. - - YANG Description: Committed Burst Size in in KBytes - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """CBS must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__CBS = t - if hasattr(self, '_set'): - self._set() - - def _unset_CBS(self): - self.__CBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - - def _get_EIR(self): - """ - Getter method for EIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/EIR (uint64) - - YANG Description: Excess Information Rate in Kbps -In case of RFC 2698, PIR = CIR + EIR - """ - return self.__EIR - - def _set_EIR(self, v, load=False): - """ - Setter method for EIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/EIR (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_EIR is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_EIR() directly. - - YANG Description: Excess Information Rate in Kbps -In case of RFC 2698, PIR = CIR + EIR - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """EIR must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__EIR = t - if hasattr(self, '_set'): - self._set() - - def _unset_EIR(self): - self.__EIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - - def _get_EBS(self): - """ - Getter method for EBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/EBS (uint64) - - YANG Description: Excess Burst Size in KBytes. - In case of RFC 2698, PBS = CBS + EBS - """ - return self.__EBS - - def _set_EBS(self, v, load=False): - """ - Setter method for EBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/EBS (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_EBS is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_EBS() directly. - - YANG Description: Excess Burst Size in KBytes. - In case of RFC 2698, PBS = CBS + EBS - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """EBS must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__EBS = t - if hasattr(self, '_set'): - self._set() - - def _unset_EBS(self): - self.__EBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - - def _get_color_aware(self): - """ - Getter method for color_aware, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/color_aware (boolean) - - YANG Description: Indicates weather the color-mode is -color-aware or color-blind. - """ - return self.__color_aware - - def _set_color_aware(self, v, load=False): - """ - Setter method for color_aware, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/color_aware (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_color_aware is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_color_aware() directly. - - YANG Description: Indicates weather the color-mode is -color-aware or color-blind. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """color_aware must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__color_aware = t - if hasattr(self, '_set'): - self._set() - - def _unset_color_aware(self): - self.__color_aware = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - - def _get_coupling_flag(self): - """ - Getter method for coupling_flag, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/coupling_flag (boolean) - - YANG Description: Coupling Flag. - """ - return self.__coupling_flag - - def _set_coupling_flag(self, v, load=False): - """ - Setter method for coupling_flag, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/coupling_flag (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_coupling_flag is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_coupling_flag() directly. - - YANG Description: Coupling Flag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """coupling_flag must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__coupling_flag = t - if hasattr(self, '_set'): - self._set() - - def _unset_coupling_flag(self): - self.__coupling_flag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - bandwidth_profile_type = __builtin__.property(_get_bandwidth_profile_type, _set_bandwidth_profile_type) - CIR = __builtin__.property(_get_CIR, _set_CIR) - CBS = __builtin__.property(_get_CBS, _set_CBS) - EIR = __builtin__.property(_get_EIR, _set_EIR) - EBS = __builtin__.property(_get_EBS, _set_EBS) - color_aware = __builtin__.property(_get_color_aware, _set_color_aware) - coupling_flag = __builtin__.property(_get_coupling_flag, _set_coupling_flag) - - __choices__ = {'direction': {'asymmetrical': ['bandwidth_profile_type', 'CIR', 'CBS', 'EIR', 'EBS', 'color_aware', 'coupling_flag']}} - _pyangbind_elements = OrderedDict([('bandwidth_profile_type', bandwidth_profile_type), ('CIR', CIR), ('CBS', CBS), ('EIR', EIR), ('EBS', EBS), ('color_aware', color_aware), ('coupling_flag', coupling_flag), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/__init__.py deleted file mode 100644 index a3ec08716..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/__init__.py +++ /dev/null @@ -1,355 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ingress_bandwidth_profile(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-link-tp/ingress-bandwidth-profile. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The bandwidth profile used in the ingress direction. - """ - __slots__ = ('_path_helper', '_extmethods', '__bandwidth_profile_type','__CIR','__CBS','__EIR','__EBS','__color_aware','__coupling_flag',) - - _yang_name = 'ingress-bandwidth-profile' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__bandwidth_profile_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) - self.__CIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - self.__CBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - self.__EIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - self.__EBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - self.__color_aware = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - self.__coupling_flag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', 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 ['networks', 'network', 'node', 'termination-point', 'eth-link-tp', 'ingress-bandwidth-profile'] - - def _get_bandwidth_profile_type(self): - """ - Getter method for bandwidth_profile_type, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/bandwidth_profile_type (etht-types:bandwidth-profile-type) - - YANG Description: The type of bandwidth profile. - """ - return self.__bandwidth_profile_type - - def _set_bandwidth_profile_type(self, v, load=False): - """ - Setter method for bandwidth_profile_type, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/bandwidth_profile_type (etht-types:bandwidth-profile-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_bandwidth_profile_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_bandwidth_profile_type() directly. - - YANG Description: The type of bandwidth profile. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """bandwidth_profile_type must be of a type compatible with etht-types:bandwidth-profile-type""", - 'defined-type': "etht-types:bandwidth-profile-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True)""", - }) - - self.__bandwidth_profile_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_bandwidth_profile_type(self): - self.__bandwidth_profile_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) - - - def _get_CIR(self): - """ - Getter method for CIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/CIR (uint64) - - YANG Description: Committed Information Rate in Kbps - """ - return self.__CIR - - def _set_CIR(self, v, load=False): - """ - Setter method for CIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/CIR (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_CIR is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_CIR() directly. - - YANG Description: Committed Information Rate in Kbps - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """CIR must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__CIR = t - if hasattr(self, '_set'): - self._set() - - def _unset_CIR(self): - self.__CIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - - def _get_CBS(self): - """ - Getter method for CBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/CBS (uint64) - - YANG Description: Committed Burst Size in in KBytes - """ - return self.__CBS - - def _set_CBS(self, v, load=False): - """ - Setter method for CBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/CBS (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_CBS is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_CBS() directly. - - YANG Description: Committed Burst Size in in KBytes - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """CBS must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__CBS = t - if hasattr(self, '_set'): - self._set() - - def _unset_CBS(self): - self.__CBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - - def _get_EIR(self): - """ - Getter method for EIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/EIR (uint64) - - YANG Description: Excess Information Rate in Kbps -In case of RFC 2698, PIR = CIR + EIR - """ - return self.__EIR - - def _set_EIR(self, v, load=False): - """ - Setter method for EIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/EIR (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_EIR is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_EIR() directly. - - YANG Description: Excess Information Rate in Kbps -In case of RFC 2698, PIR = CIR + EIR - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """EIR must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__EIR = t - if hasattr(self, '_set'): - self._set() - - def _unset_EIR(self): - self.__EIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - - def _get_EBS(self): - """ - Getter method for EBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/EBS (uint64) - - YANG Description: Excess Burst Size in KBytes. - In case of RFC 2698, PBS = CBS + EBS - """ - return self.__EBS - - def _set_EBS(self, v, load=False): - """ - Setter method for EBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/EBS (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_EBS is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_EBS() directly. - - YANG Description: Excess Burst Size in KBytes. - In case of RFC 2698, PBS = CBS + EBS - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """EBS must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__EBS = t - if hasattr(self, '_set'): - self._set() - - def _unset_EBS(self): - self.__EBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - - def _get_color_aware(self): - """ - Getter method for color_aware, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/color_aware (boolean) - - YANG Description: Indicates weather the color-mode is -color-aware or color-blind. - """ - return self.__color_aware - - def _set_color_aware(self, v, load=False): - """ - Setter method for color_aware, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/color_aware (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_color_aware is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_color_aware() directly. - - YANG Description: Indicates weather the color-mode is -color-aware or color-blind. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """color_aware must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__color_aware = t - if hasattr(self, '_set'): - self._set() - - def _unset_color_aware(self): - self.__color_aware = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - - def _get_coupling_flag(self): - """ - Getter method for coupling_flag, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/coupling_flag (boolean) - - YANG Description: Coupling Flag. - """ - return self.__coupling_flag - - def _set_coupling_flag(self, v, load=False): - """ - Setter method for coupling_flag, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/coupling_flag (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_coupling_flag is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_coupling_flag() directly. - - YANG Description: Coupling Flag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """coupling_flag must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__coupling_flag = t - if hasattr(self, '_set'): - self._set() - - def _unset_coupling_flag(self): - self.__coupling_flag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - bandwidth_profile_type = __builtin__.property(_get_bandwidth_profile_type, _set_bandwidth_profile_type) - CIR = __builtin__.property(_get_CIR, _set_CIR) - CBS = __builtin__.property(_get_CBS, _set_CBS) - EIR = __builtin__.property(_get_EIR, _set_EIR) - EBS = __builtin__.property(_get_EBS, _set_EBS) - color_aware = __builtin__.property(_get_color_aware, _set_color_aware) - coupling_flag = __builtin__.property(_get_coupling_flag, _set_coupling_flag) - - __choices__ = {'direction': {'asymmetrical': ['bandwidth_profile_type', 'CIR', 'CBS', 'EIR', 'EBS', 'color_aware', 'coupling_flag']}} - _pyangbind_elements = OrderedDict([('bandwidth_profile_type', bandwidth_profile_type), ('CIR', CIR), ('CBS', CBS), ('EIR', EIR), ('EBS', EBS), ('color_aware', color_aware), ('coupling_flag', coupling_flag), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/__init__.py deleted file mode 100644 index 87d611cce..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/__init__.py +++ /dev/null @@ -1,356 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ingress_egress_bandwidth_profile(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-link-tp/ingress-egress-bandwidth-profile. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The bandwith profile used in the ingress and egress -direction. - """ - __slots__ = ('_path_helper', '_extmethods', '__bandwidth_profile_type','__CIR','__CBS','__EIR','__EBS','__color_aware','__coupling_flag',) - - _yang_name = 'ingress-egress-bandwidth-profile' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__bandwidth_profile_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) - self.__CIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - self.__CBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - self.__EIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - self.__EBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - self.__color_aware = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - self.__coupling_flag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', 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 ['networks', 'network', 'node', 'termination-point', 'eth-link-tp', 'ingress-egress-bandwidth-profile'] - - def _get_bandwidth_profile_type(self): - """ - Getter method for bandwidth_profile_type, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/bandwidth_profile_type (etht-types:bandwidth-profile-type) - - YANG Description: The type of bandwidth profile. - """ - return self.__bandwidth_profile_type - - def _set_bandwidth_profile_type(self, v, load=False): - """ - Setter method for bandwidth_profile_type, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/bandwidth_profile_type (etht-types:bandwidth-profile-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_bandwidth_profile_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_bandwidth_profile_type() directly. - - YANG Description: The type of bandwidth profile. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """bandwidth_profile_type must be of a type compatible with etht-types:bandwidth-profile-type""", - 'defined-type': "etht-types:bandwidth-profile-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True)""", - }) - - self.__bandwidth_profile_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_bandwidth_profile_type(self): - self.__bandwidth_profile_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) - - - def _get_CIR(self): - """ - Getter method for CIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/CIR (uint64) - - YANG Description: Committed Information Rate in Kbps - """ - return self.__CIR - - def _set_CIR(self, v, load=False): - """ - Setter method for CIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/CIR (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_CIR is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_CIR() directly. - - YANG Description: Committed Information Rate in Kbps - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """CIR must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__CIR = t - if hasattr(self, '_set'): - self._set() - - def _unset_CIR(self): - self.__CIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - - def _get_CBS(self): - """ - Getter method for CBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/CBS (uint64) - - YANG Description: Committed Burst Size in in KBytes - """ - return self.__CBS - - def _set_CBS(self, v, load=False): - """ - Setter method for CBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/CBS (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_CBS is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_CBS() directly. - - YANG Description: Committed Burst Size in in KBytes - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """CBS must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__CBS = t - if hasattr(self, '_set'): - self._set() - - def _unset_CBS(self): - self.__CBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - - def _get_EIR(self): - """ - Getter method for EIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/EIR (uint64) - - YANG Description: Excess Information Rate in Kbps -In case of RFC 2698, PIR = CIR + EIR - """ - return self.__EIR - - def _set_EIR(self, v, load=False): - """ - Setter method for EIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/EIR (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_EIR is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_EIR() directly. - - YANG Description: Excess Information Rate in Kbps -In case of RFC 2698, PIR = CIR + EIR - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """EIR must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__EIR = t - if hasattr(self, '_set'): - self._set() - - def _unset_EIR(self): - self.__EIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - - def _get_EBS(self): - """ - Getter method for EBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/EBS (uint64) - - YANG Description: Excess Burst Size in KBytes. - In case of RFC 2698, PBS = CBS + EBS - """ - return self.__EBS - - def _set_EBS(self, v, load=False): - """ - Setter method for EBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/EBS (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_EBS is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_EBS() directly. - - YANG Description: Excess Burst Size in KBytes. - In case of RFC 2698, PBS = CBS + EBS - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """EBS must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__EBS = t - if hasattr(self, '_set'): - self._set() - - def _unset_EBS(self): - self.__EBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - - def _get_color_aware(self): - """ - Getter method for color_aware, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/color_aware (boolean) - - YANG Description: Indicates weather the color-mode is -color-aware or color-blind. - """ - return self.__color_aware - - def _set_color_aware(self, v, load=False): - """ - Setter method for color_aware, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/color_aware (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_color_aware is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_color_aware() directly. - - YANG Description: Indicates weather the color-mode is -color-aware or color-blind. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """color_aware must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__color_aware = t - if hasattr(self, '_set'): - self._set() - - def _unset_color_aware(self): - self.__color_aware = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - - def _get_coupling_flag(self): - """ - Getter method for coupling_flag, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/coupling_flag (boolean) - - YANG Description: Coupling Flag. - """ - return self.__coupling_flag - - def _set_coupling_flag(self, v, load=False): - """ - Setter method for coupling_flag, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/coupling_flag (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_coupling_flag is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_coupling_flag() directly. - - YANG Description: Coupling Flag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """coupling_flag must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__coupling_flag = t - if hasattr(self, '_set'): - self._set() - - def _unset_coupling_flag(self): - self.__coupling_flag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - bandwidth_profile_type = __builtin__.property(_get_bandwidth_profile_type, _set_bandwidth_profile_type) - CIR = __builtin__.property(_get_CIR, _set_CIR) - CBS = __builtin__.property(_get_CBS, _set_CBS) - EIR = __builtin__.property(_get_EIR, _set_EIR) - EBS = __builtin__.property(_get_EBS, _set_EBS) - color_aware = __builtin__.property(_get_color_aware, _set_color_aware) - coupling_flag = __builtin__.property(_get_coupling_flag, _set_coupling_flag) - - __choices__ = {'direction': {'symmetrical': ['bandwidth_profile_type', 'CIR', 'CBS', 'EIR', 'EBS', 'color_aware', 'coupling_flag']}} - _pyangbind_elements = OrderedDict([('bandwidth_profile_type', bandwidth_profile_type), ('CIR', CIR), ('CBS', CBS), ('EIR', EIR), ('EBS', EBS), ('color_aware', color_aware), ('coupling_flag', coupling_flag), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/__init__.py deleted file mode 100644 index 940aa4ef9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import supported_classification -from . import supported_vlan_operations -class eth_svc(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: ETH LTP Service attributes. - """ - __slots__ = ('_path_helper', '_extmethods', '__supported_classification','__supported_vlan_operations',) - - _yang_name = 'eth-svc' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__supported_classification = YANGDynClass(base=supported_classification.supported_classification, is_container='container', yang_name="supported-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - self.__supported_vlan_operations = YANGDynClass(base=supported_vlan_operations.supported_vlan_operations, is_container='container', yang_name="supported-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'network', 'node', 'termination-point', 'eth-svc'] - - def _get_supported_classification(self): - """ - Getter method for supported_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification (container) - - YANG Description: Service classification capability supported by the -Ethernet Link Termination Point (LTP). - """ - return self.__supported_classification - - def _set_supported_classification(self, v, load=False): - """ - Setter method for supported_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_supported_classification is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_supported_classification() directly. - - YANG Description: Service classification capability supported by the -Ethernet Link Termination Point (LTP). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=supported_classification.supported_classification, is_container='container', yang_name="supported-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """supported_classification must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=supported_classification.supported_classification, is_container='container', yang_name="supported-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__supported_classification = t - if hasattr(self, '_set'): - self._set() - - def _unset_supported_classification(self): - self.__supported_classification = YANGDynClass(base=supported_classification.supported_classification, is_container='container', yang_name="supported-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - - def _get_supported_vlan_operations(self): - """ - Getter method for supported_vlan_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations (container) - - YANG Description: Reports the VLAN operations supported by the ETH LTP. - """ - return self.__supported_vlan_operations - - def _set_supported_vlan_operations(self, v, load=False): - """ - Setter method for supported_vlan_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_supported_vlan_operations is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_supported_vlan_operations() directly. - - YANG Description: Reports the VLAN operations supported by the ETH LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=supported_vlan_operations.supported_vlan_operations, is_container='container', yang_name="supported-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """supported_vlan_operations must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=supported_vlan_operations.supported_vlan_operations, is_container='container', yang_name="supported-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__supported_vlan_operations = t - if hasattr(self, '_set'): - self._set() - - def _unset_supported_vlan_operations(self): - self.__supported_vlan_operations = YANGDynClass(base=supported_vlan_operations.supported_vlan_operations, is_container='container', yang_name="supported-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - supported_classification = __builtin__.property(_get_supported_classification, _set_supported_classification) - supported_vlan_operations = __builtin__.property(_get_supported_vlan_operations, _set_supported_vlan_operations) - - - _pyangbind_elements = OrderedDict([('supported_classification', supported_classification), ('supported_vlan_operations', supported_vlan_operations), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/__init__.py deleted file mode 100644 index 5a244125d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/__init__.py +++ /dev/null @@ -1,160 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import vlan_classification -class supported_classification(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-classification. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Service classification capability supported by the -Ethernet Link Termination Point (LTP). - """ - __slots__ = ('_path_helper', '_extmethods', '__port_classification','__vlan_classification',) - - _yang_name = 'supported-classification' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__port_classification = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="port-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - self.__vlan_classification = YANGDynClass(base=vlan_classification.vlan_classification, is_container='container', yang_name="vlan-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-classification'] - - def _get_port_classification(self): - """ - Getter method for port_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/port_classification (boolean) - - YANG Description: Indicates that the ETH LTP support port-based service -classification. - """ - return self.__port_classification - - def _set_port_classification(self, v, load=False): - """ - Setter method for port_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/port_classification (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_port_classification is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_port_classification() directly. - - YANG Description: Indicates that the ETH LTP support port-based service -classification. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="port-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """port_classification must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="port-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__port_classification = t - if hasattr(self, '_set'): - self._set() - - def _unset_port_classification(self): - self.__port_classification = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="port-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - - def _get_vlan_classification(self): - """ - Getter method for vlan_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification (container) - - YANG Description: Service classification capabilities based on the VLAN -tag(s) supported by the ETH LTP. - """ - return self.__vlan_classification - - def _set_vlan_classification(self, v, load=False): - """ - Setter method for vlan_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlan_classification is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlan_classification() directly. - - YANG Description: Service classification capabilities based on the VLAN -tag(s) supported by the ETH LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=vlan_classification.vlan_classification, is_container='container', yang_name="vlan-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlan_classification must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=vlan_classification.vlan_classification, is_container='container', yang_name="vlan-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__vlan_classification = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlan_classification(self): - self.__vlan_classification = YANGDynClass(base=vlan_classification.vlan_classification, is_container='container', yang_name="vlan-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - port_classification = __builtin__.property(_get_port_classification, _set_port_classification) - vlan_classification = __builtin__.property(_get_vlan_classification, _set_vlan_classification) - - - _pyangbind_elements = OrderedDict([('port_classification', port_classification), ('vlan_classification', vlan_classification), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/__init__.py deleted file mode 100644 index fa8bc5167..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/__init__.py +++ /dev/null @@ -1,202 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import outer_tag -from . import second_tag -class vlan_classification(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-classification/vlan-classification. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Service classification capabilities based on the VLAN -tag(s) supported by the ETH LTP. - """ - __slots__ = ('_path_helper', '_extmethods', '__vlan_tag_classification','__outer_tag','__second_tag',) - - _yang_name = 'vlan-classification' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__vlan_tag_classification = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - self.__outer_tag = YANGDynClass(base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - self.__second_tag = YANGDynClass(base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-classification', 'vlan-classification'] - - def _get_vlan_tag_classification(self): - """ - Getter method for vlan_tag_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/vlan_tag_classification (boolean) - - YANG Description: Indicates that the ETH LTP supports VLAN service -classification. - """ - return self.__vlan_tag_classification - - def _set_vlan_tag_classification(self, v, load=False): - """ - Setter method for vlan_tag_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/vlan_tag_classification (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlan_tag_classification is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlan_tag_classification() directly. - - YANG Description: Indicates that the ETH LTP supports VLAN service -classification. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="vlan-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlan_tag_classification must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__vlan_tag_classification = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlan_tag_classification(self): - self.__vlan_tag_classification = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - - def _get_outer_tag(self): - """ - Getter method for outer_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag (container) - - YANG Description: Service classification capabilities based on the outer -VLAN tag, supported by the ETH LTP. - """ - return self.__outer_tag - - def _set_outer_tag(self, v, load=False): - """ - Setter method for outer_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_outer_tag is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_outer_tag() directly. - - YANG Description: Service classification capabilities based on the outer -VLAN tag, supported by the ETH LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """outer_tag must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__outer_tag = t - if hasattr(self, '_set'): - self._set() - - def _unset_outer_tag(self): - self.__outer_tag = YANGDynClass(base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - - def _get_second_tag(self): - """ - Getter method for second_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag (container) - - YANG Description: Service classification capabilities based on the second -VLAN tag, supported by the ETH LTP. - """ - return self.__second_tag - - def _set_second_tag(self, v, load=False): - """ - Setter method for second_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_second_tag is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_second_tag() directly. - - YANG Description: Service classification capabilities based on the second -VLAN tag, supported by the ETH LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """second_tag must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__second_tag = t - if hasattr(self, '_set'): - self._set() - - def _unset_second_tag(self): - self.__second_tag = YANGDynClass(base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - vlan_tag_classification = __builtin__.property(_get_vlan_tag_classification, _set_vlan_tag_classification) - outer_tag = __builtin__.property(_get_outer_tag, _set_outer_tag) - second_tag = __builtin__.property(_get_second_tag, _set_second_tag) - - - _pyangbind_elements = OrderedDict([('vlan_tag_classification', vlan_tag_classification), ('outer_tag', outer_tag), ('second_tag', second_tag), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/__init__.py deleted file mode 100644 index 83e6e19a2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/__init__.py +++ /dev/null @@ -1,202 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class outer_tag(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-classification/vlan-classification/outer-tag. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Service classification capabilities based on the outer -VLAN tag, supported by the ETH LTP. - """ - __slots__ = ('_path_helper', '_extmethods', '__supported_tag_types','__vlan_bundling','__vlan_range',) - - _yang_name = 'outer-tag' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True) - self.__vlan_bundling = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', 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 ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-classification', 'vlan-classification', 'outer-tag'] - - def _get_supported_tag_types(self): - """ - Getter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/supported_tag_types (etht-types:eth-tag-classify) - - YANG Description: List of VLAN tag types that can be used for the VLAN -classification. In case VLAN classification is not -supported, the list is empty. - """ - return self.__supported_tag_types - - def _set_supported_tag_types(self, v, load=False): - """ - Setter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/supported_tag_types (etht-types:eth-tag-classify) - If this variable is read-only (config: false) in the - source YANG file, then _set_supported_tag_types is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_supported_tag_types() directly. - - YANG Description: List of VLAN tag types that can be used for the VLAN -classification. In case VLAN classification is not -supported, the list is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """supported_tag_types must be of a type compatible with etht-types:eth-tag-classify""", - 'defined-type': "etht-types:eth-tag-classify", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True)""", - }) - - self.__supported_tag_types = t - if hasattr(self, '_set'): - self._set() - - def _unset_supported_tag_types(self): - self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True) - - - def _get_vlan_bundling(self): - """ - Getter method for vlan_bundling, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/vlan_bundling (boolean) - - YANG Description: In case VLAN classification is supported, indicates whether -VLAN bundling classification is also supported. - """ - return self.__vlan_bundling - - def _set_vlan_bundling(self, v, load=False): - """ - Setter method for vlan_bundling, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/vlan_bundling (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlan_bundling is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlan_bundling() directly. - - YANG Description: In case VLAN classification is supported, indicates whether -VLAN bundling classification is also supported. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlan_bundling must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__vlan_bundling = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlan_bundling(self): - self.__vlan_bundling = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - - def _get_vlan_range(self): - """ - Getter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/vlan_range (etht-types:vid-range-type) - - YANG Description: In case VLAN classification is supported, indicates the -of available VLAN ID values. - """ - return self.__vlan_range - - def _set_vlan_range(self, v, load=False): - """ - Setter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/vlan_range (etht-types:vid-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlan_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlan_range() directly. - - YANG Description: In case VLAN classification is supported, indicates the -of available VLAN ID values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlan_range must be of a type compatible with etht-types:vid-range-type""", - 'defined-type': "etht-types:vid-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True)""", - }) - - self.__vlan_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlan_range(self): - self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) - - supported_tag_types = __builtin__.property(_get_supported_tag_types, _set_supported_tag_types) - vlan_bundling = __builtin__.property(_get_vlan_bundling, _set_vlan_bundling) - vlan_range = __builtin__.property(_get_vlan_range, _set_vlan_range) - - - _pyangbind_elements = OrderedDict([('supported_tag_types', supported_tag_types), ('vlan_bundling', vlan_bundling), ('vlan_range', vlan_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/__init__.py deleted file mode 100644 index 98c6f2462..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/__init__.py +++ /dev/null @@ -1,243 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class second_tag(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-classification/vlan-classification/second-tag. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Service classification capabilities based on the second -VLAN tag, supported by the ETH LTP. - """ - __slots__ = ('_path_helper', '_extmethods', '__second_tag_classification','__supported_tag_types','__vlan_bundling','__vlan_range',) - - _yang_name = 'second-tag' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__second_tag_classification = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="second-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True) - self.__vlan_bundling = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', 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 ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-classification', 'vlan-classification', 'second-tag'] - - def _get_second_tag_classification(self): - """ - Getter method for second_tag_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/second_tag_classification (boolean) - - YANG Description: Indicates that the ETH LTP support VLAN service -classification based on the second VLAN tag. - """ - return self.__second_tag_classification - - def _set_second_tag_classification(self, v, load=False): - """ - Setter method for second_tag_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/second_tag_classification (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_second_tag_classification is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_second_tag_classification() directly. - - YANG Description: Indicates that the ETH LTP support VLAN service -classification based on the second VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="second-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """second_tag_classification must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="second-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__second_tag_classification = t - if hasattr(self, '_set'): - self._set() - - def _unset_second_tag_classification(self): - self.__second_tag_classification = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="second-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - - def _get_supported_tag_types(self): - """ - Getter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/supported_tag_types (etht-types:eth-tag-classify) - - YANG Description: List of VLAN tag types that can be used for the VLAN -classification. In case VLAN classification is not -supported, the list is empty. - """ - return self.__supported_tag_types - - def _set_supported_tag_types(self, v, load=False): - """ - Setter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/supported_tag_types (etht-types:eth-tag-classify) - If this variable is read-only (config: false) in the - source YANG file, then _set_supported_tag_types is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_supported_tag_types() directly. - - YANG Description: List of VLAN tag types that can be used for the VLAN -classification. In case VLAN classification is not -supported, the list is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """supported_tag_types must be of a type compatible with etht-types:eth-tag-classify""", - 'defined-type': "etht-types:eth-tag-classify", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True)""", - }) - - self.__supported_tag_types = t - if hasattr(self, '_set'): - self._set() - - def _unset_supported_tag_types(self): - self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True) - - - def _get_vlan_bundling(self): - """ - Getter method for vlan_bundling, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/vlan_bundling (boolean) - - YANG Description: In case VLAN classification is supported, indicates whether -VLAN bundling classification is also supported. - """ - return self.__vlan_bundling - - def _set_vlan_bundling(self, v, load=False): - """ - Setter method for vlan_bundling, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/vlan_bundling (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlan_bundling is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlan_bundling() directly. - - YANG Description: In case VLAN classification is supported, indicates whether -VLAN bundling classification is also supported. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlan_bundling must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__vlan_bundling = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlan_bundling(self): - self.__vlan_bundling = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - - def _get_vlan_range(self): - """ - Getter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/vlan_range (etht-types:vid-range-type) - - YANG Description: In case VLAN classification is supported, indicates the -of available VLAN ID values. - """ - return self.__vlan_range - - def _set_vlan_range(self, v, load=False): - """ - Setter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/vlan_range (etht-types:vid-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlan_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlan_range() directly. - - YANG Description: In case VLAN classification is supported, indicates the -of available VLAN ID values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlan_range must be of a type compatible with etht-types:vid-range-type""", - 'defined-type': "etht-types:vid-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True)""", - }) - - self.__vlan_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlan_range(self): - self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) - - second_tag_classification = __builtin__.property(_get_second_tag_classification, _set_second_tag_classification) - supported_tag_types = __builtin__.property(_get_supported_tag_types, _set_supported_tag_types) - vlan_bundling = __builtin__.property(_get_vlan_bundling, _set_vlan_bundling) - vlan_range = __builtin__.property(_get_vlan_range, _set_vlan_range) - - - _pyangbind_elements = OrderedDict([('second_tag_classification', second_tag_classification), ('supported_tag_types', supported_tag_types), ('vlan_bundling', vlan_bundling), ('vlan_range', vlan_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/__init__.py deleted file mode 100644 index 9b5cfc5b2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/__init__.py +++ /dev/null @@ -1,240 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import vlan_pop -from . import vlan_push -class supported_vlan_operations(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-vlan-operations. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Reports the VLAN operations supported by the ETH LTP. - """ - __slots__ = ('_path_helper', '_extmethods', '__asymmetrical_operations','__transparent_vlan_operations','__vlan_pop','__vlan_push',) - - _yang_name = 'supported-vlan-operations' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__asymmetrical_operations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="asymmetrical-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - self.__transparent_vlan_operations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transparent-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - self.__vlan_pop = YANGDynClass(base=vlan_pop.vlan_pop, is_container='container', yang_name="vlan-pop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - self.__vlan_push = YANGDynClass(base=vlan_push.vlan_push, is_container='container', yang_name="vlan-push", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-vlan-operations'] - - def _get_asymmetrical_operations(self): - """ - Getter method for asymmetrical_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/asymmetrical_operations (boolean) - - YANG Description: Indicates whether the ETH LTP supports also asymmetrical -VLAN operations.It is assumed that symmetrical VLAN -operations are alwyas supported. - """ - return self.__asymmetrical_operations - - def _set_asymmetrical_operations(self, v, load=False): - """ - Setter method for asymmetrical_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/asymmetrical_operations (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_asymmetrical_operations is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_asymmetrical_operations() directly. - - YANG Description: Indicates whether the ETH LTP supports also asymmetrical -VLAN operations.It is assumed that symmetrical VLAN -operations are alwyas supported. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="asymmetrical-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """asymmetrical_operations must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="asymmetrical-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__asymmetrical_operations = t - if hasattr(self, '_set'): - self._set() - - def _unset_asymmetrical_operations(self): - self.__asymmetrical_operations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="asymmetrical-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - - def _get_transparent_vlan_operations(self): - """ - Getter method for transparent_vlan_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/transparent_vlan_operations (boolean) - - YANG Description: Indicates that the ETH LTP supports transparent -operations. - """ - return self.__transparent_vlan_operations - - def _set_transparent_vlan_operations(self, v, load=False): - """ - Setter method for transparent_vlan_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/transparent_vlan_operations (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_transparent_vlan_operations is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_transparent_vlan_operations() directly. - - YANG Description: Indicates that the ETH LTP supports transparent -operations. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transparent-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """transparent_vlan_operations must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transparent-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__transparent_vlan_operations = t - if hasattr(self, '_set'): - self._set() - - def _unset_transparent_vlan_operations(self): - self.__transparent_vlan_operations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transparent-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - - def _get_vlan_pop(self): - """ - Getter method for vlan_pop, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop (container) - - YANG Description: Indicates VLAN pop or swap operations capabilities. - """ - return self.__vlan_pop - - def _set_vlan_pop(self, v, load=False): - """ - Setter method for vlan_pop, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlan_pop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlan_pop() directly. - - YANG Description: Indicates VLAN pop or swap operations capabilities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=vlan_pop.vlan_pop, is_container='container', yang_name="vlan-pop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlan_pop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=vlan_pop.vlan_pop, is_container='container', yang_name="vlan-pop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__vlan_pop = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlan_pop(self): - self.__vlan_pop = YANGDynClass(base=vlan_pop.vlan_pop, is_container='container', yang_name="vlan-pop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - - def _get_vlan_push(self): - """ - Getter method for vlan_push, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push (container) - - YANG Description: Indicates VLAN push or swap operations capabilities. - """ - return self.__vlan_push - - def _set_vlan_push(self, v, load=False): - """ - Setter method for vlan_push, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlan_push is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlan_push() directly. - - YANG Description: Indicates VLAN push or swap operations capabilities. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=vlan_push.vlan_push, is_container='container', yang_name="vlan-push", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlan_push must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=vlan_push.vlan_push, is_container='container', yang_name="vlan-push", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__vlan_push = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlan_push(self): - self.__vlan_push = YANGDynClass(base=vlan_push.vlan_push, is_container='container', yang_name="vlan-push", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - asymmetrical_operations = __builtin__.property(_get_asymmetrical_operations, _set_asymmetrical_operations) - transparent_vlan_operations = __builtin__.property(_get_transparent_vlan_operations, _set_transparent_vlan_operations) - vlan_pop = __builtin__.property(_get_vlan_pop, _set_vlan_pop) - vlan_push = __builtin__.property(_get_vlan_push, _set_vlan_push) - - - _pyangbind_elements = OrderedDict([('asymmetrical_operations', asymmetrical_operations), ('transparent_vlan_operations', transparent_vlan_operations), ('vlan_pop', vlan_pop), ('vlan_push', vlan_push), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/__init__.py deleted file mode 100644 index bfeb46635..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class vlan_pop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-vlan-operations/vlan-pop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Indicates VLAN pop or swap operations capabilities. - """ - __slots__ = ('_path_helper', '_extmethods', '__vlan_pop_operations','__max_pop_tags',) - - _yang_name = 'vlan-pop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__vlan_pop_operations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-pop-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - self.__max_pop_tags = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="max-pop-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', 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 ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-vlan-operations', 'vlan-pop'] - - def _get_vlan_pop_operations(self): - """ - Getter method for vlan_pop_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/vlan_pop_operations (boolean) - - YANG Description: Indicates that the ETH LTP supports VLAN pop or -swap operations. - """ - return self.__vlan_pop_operations - - def _set_vlan_pop_operations(self, v, load=False): - """ - Setter method for vlan_pop_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/vlan_pop_operations (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlan_pop_operations is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlan_pop_operations() directly. - - YANG Description: Indicates that the ETH LTP supports VLAN pop or -swap operations. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="vlan-pop-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlan_pop_operations must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-pop-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__vlan_pop_operations = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlan_pop_operations(self): - self.__vlan_pop_operations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-pop-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - - def _get_max_pop_tags(self): - """ - Getter method for max_pop_tags, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/max_pop_tags (uint8) - - YANG Description: Indicates the maximum number of tags that can be -popped/swapped. - """ - return self.__max_pop_tags - - def _set_max_pop_tags(self, v, load=False): - """ - Setter method for max_pop_tags, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/max_pop_tags (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_pop_tags is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_pop_tags() directly. - - YANG Description: Indicates the maximum number of tags that can be -popped/swapped. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="max-pop-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_pop_tags must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="max-pop-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__max_pop_tags = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_pop_tags(self): - self.__max_pop_tags = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="max-pop-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - - vlan_pop_operations = __builtin__.property(_get_vlan_pop_operations, _set_vlan_pop_operations) - max_pop_tags = __builtin__.property(_get_max_pop_tags, _set_max_pop_tags) - - - _pyangbind_elements = OrderedDict([('vlan_pop_operations', vlan_pop_operations), ('max_pop_tags', max_pop_tags), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/__init__.py deleted file mode 100644 index 256af6aa1..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/__init__.py +++ /dev/null @@ -1,201 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import outer_tag -from . import second_tag -class vlan_push(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-vlan-operations/vlan-push. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Indicates VLAN push or swap operations capabilities. - """ - __slots__ = ('_path_helper', '_extmethods', '__vlan_push_operation','__outer_tag','__second_tag',) - - _yang_name = 'vlan-push' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__vlan_push_operation = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-push-operation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - self.__outer_tag = YANGDynClass(base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - self.__second_tag = YANGDynClass(base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-vlan-operations', 'vlan-push'] - - def _get_vlan_push_operation(self): - """ - Getter method for vlan_push_operation, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/vlan_push_operation (boolean) - - YANG Description: Indicates that the ETH LTP supports VLAN push or -swap operations. - """ - return self.__vlan_push_operation - - def _set_vlan_push_operation(self, v, load=False): - """ - Setter method for vlan_push_operation, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/vlan_push_operation (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlan_push_operation is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlan_push_operation() directly. - - YANG Description: Indicates that the ETH LTP supports VLAN push or -swap operations. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="vlan-push-operation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlan_push_operation must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-push-operation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__vlan_push_operation = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlan_push_operation(self): - self.__vlan_push_operation = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-push-operation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - - def _get_outer_tag(self): - """ - Getter method for outer_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag (container) - - YANG Description: Indicates the supported VLAN operation capabilities -on the outer VLAN tag. - """ - return self.__outer_tag - - def _set_outer_tag(self, v, load=False): - """ - Setter method for outer_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_outer_tag is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_outer_tag() directly. - - YANG Description: Indicates the supported VLAN operation capabilities -on the outer VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """outer_tag must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__outer_tag = t - if hasattr(self, '_set'): - self._set() - - def _unset_outer_tag(self): - self.__outer_tag = YANGDynClass(base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - - def _get_second_tag(self): - """ - Getter method for second_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag (container) - - YANG Description: Indicates the supported VLAN operation capabilities -on the second VLAN tag. - """ - return self.__second_tag - - def _set_second_tag(self, v, load=False): - """ - Setter method for second_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_second_tag is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_second_tag() directly. - - YANG Description: Indicates the supported VLAN operation capabilities -on the second VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """second_tag must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__second_tag = t - if hasattr(self, '_set'): - self._set() - - def _unset_second_tag(self): - self.__second_tag = YANGDynClass(base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - vlan_push_operation = __builtin__.property(_get_vlan_push_operation, _set_vlan_push_operation) - outer_tag = __builtin__.property(_get_outer_tag, _set_outer_tag) - second_tag = __builtin__.property(_get_second_tag, _set_second_tag) - - - _pyangbind_elements = OrderedDict([('vlan_push_operation', vlan_push_operation), ('outer_tag', outer_tag), ('second_tag', second_tag), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/__init__.py deleted file mode 100644 index c468dbf17..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class outer_tag(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-vlan-operations/vlan-push/outer-tag. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Indicates the supported VLAN operation capabilities -on the outer VLAN tag. - """ - __slots__ = ('_path_helper', '_extmethods', '__supported_tag_types','__vlan_range',) - - _yang_name = 'outer-tag' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', 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 ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-vlan-operations', 'vlan-push', 'outer-tag'] - - def _get_supported_tag_types(self): - """ - Getter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/supported_tag_types (etht-types:eth-tag-type) - - YANG Description: List of VLAN tag types that can be used to push or swap a -VLAN tag. In case VLAN push/swap is not supported, the list -is empty. - """ - return self.__supported_tag_types - - def _set_supported_tag_types(self, v, load=False): - """ - Setter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/supported_tag_types (etht-types:eth-tag-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_supported_tag_types is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_supported_tag_types() directly. - - YANG Description: List of VLAN tag types that can be used to push or swap a -VLAN tag. In case VLAN push/swap is not supported, the list -is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """supported_tag_types must be of a type compatible with etht-types:eth-tag-type""", - 'defined-type': "etht-types:eth-tag-type", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", - }) - - self.__supported_tag_types = t - if hasattr(self, '_set'): - self._set() - - def _unset_supported_tag_types(self): - self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - - - def _get_vlan_range(self): - """ - Getter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/vlan_range (etht-types:vid-range-type) - - YANG Description: In case VLAN push/swap operation is supported, the range -of available VLAN ID values. - """ - return self.__vlan_range - - def _set_vlan_range(self, v, load=False): - """ - Setter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/vlan_range (etht-types:vid-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlan_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlan_range() directly. - - YANG Description: In case VLAN push/swap operation is supported, the range -of available VLAN ID values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlan_range must be of a type compatible with etht-types:vid-range-type""", - 'defined-type': "etht-types:vid-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True)""", - }) - - self.__vlan_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlan_range(self): - self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) - - supported_tag_types = __builtin__.property(_get_supported_tag_types, _set_supported_tag_types) - vlan_range = __builtin__.property(_get_vlan_range, _set_vlan_range) - - - _pyangbind_elements = OrderedDict([('supported_tag_types', supported_tag_types), ('vlan_range', vlan_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/__init__.py deleted file mode 100644 index 33831d331..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/__init__.py +++ /dev/null @@ -1,202 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class second_tag(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-vlan-operations/vlan-push/second-tag. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Indicates the supported VLAN operation capabilities -on the second VLAN tag. - """ - __slots__ = ('_path_helper', '_extmethods', '__push_second_tag','__supported_tag_types','__vlan_range',) - - _yang_name = 'second-tag' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__push_second_tag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="push-second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', 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 ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-vlan-operations', 'vlan-push', 'second-tag'] - - def _get_push_second_tag(self): - """ - Getter method for push_second_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/push_second_tag (boolean) - - YANG Description: Indicates that the ETH LTP supports VLAN push or swap -operations for the second VLAN tag. - """ - return self.__push_second_tag - - def _set_push_second_tag(self, v, load=False): - """ - Setter method for push_second_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/push_second_tag (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_push_second_tag is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_push_second_tag() directly. - - YANG Description: Indicates that the ETH LTP supports VLAN push or swap -operations for the second VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="push-second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """push_second_tag must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="push-second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__push_second_tag = t - if hasattr(self, '_set'): - self._set() - - def _unset_push_second_tag(self): - self.__push_second_tag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="push-second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) - - - def _get_supported_tag_types(self): - """ - Getter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/supported_tag_types (etht-types:eth-tag-type) - - YANG Description: List of VLAN tag types that can be used to push or swap a -VLAN tag. In case VLAN push/swap is not supported, the list -is empty. - """ - return self.__supported_tag_types - - def _set_supported_tag_types(self, v, load=False): - """ - Setter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/supported_tag_types (etht-types:eth-tag-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_supported_tag_types is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_supported_tag_types() directly. - - YANG Description: List of VLAN tag types that can be used to push or swap a -VLAN tag. In case VLAN push/swap is not supported, the list -is empty. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """supported_tag_types must be of a type compatible with etht-types:eth-tag-type""", - 'defined-type': "etht-types:eth-tag-type", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", - }) - - self.__supported_tag_types = t - if hasattr(self, '_set'): - self._set() - - def _unset_supported_tag_types(self): - self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - - - def _get_vlan_range(self): - """ - Getter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/vlan_range (etht-types:vid-range-type) - - YANG Description: In case VLAN push/swap operation is supported, the range -of available VLAN ID values. - """ - return self.__vlan_range - - def _set_vlan_range(self, v, load=False): - """ - Setter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/vlan_range (etht-types:vid-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlan_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlan_range() directly. - - YANG Description: In case VLAN push/swap operation is supported, the range -of available VLAN ID values. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlan_range must be of a type compatible with etht-types:vid-range-type""", - 'defined-type': "etht-types:vid-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True)""", - }) - - self.__vlan_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlan_range(self): - self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) - - push_second_tag = __builtin__.property(_get_push_second_tag, _set_push_second_tag) - supported_tag_types = __builtin__.property(_get_supported_tag_types, _set_supported_tag_types) - vlan_range = __builtin__.property(_get_vlan_range, _set_vlan_range) - - - _pyangbind_elements = OrderedDict([('push_second_tag', push_second_tag), ('supported_tag_types', supported_tag_types), ('vlan_range', vlan_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py deleted file mode 100644 index cb2a897c8..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py +++ /dev/null @@ -1,222 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class supporting_termination_point(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/supporting-termination-point. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This list identifies any termination points on which a -given termination point depends or onto which it maps. -Those termination points will themselves be contained -in a supporting node. This dependency information can be -inferred from the dependencies between links. Therefore, -this item is not separately configurable. Hence, no -corresponding constraint needs to be articulated. -The corresponding information is simply provided by the -implementing system. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref','__node_ref','__tp_ref',) - - _yang_name = 'supporting-termination-point' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', 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 ['networks', 'network', 'node', 'termination-point', 'supporting-termination-point'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point/network_ref (leafref) - - YANG Description: This leaf identifies in which topology the -supporting termination point is present. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: This leaf identifies in which topology the -supporting termination point is present. - """ - 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=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - - - def _get_node_ref(self): - """ - Getter method for node_ref, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point/node_ref (leafref) - - YANG Description: This leaf identifies in which node the supporting -termination point is present. - """ - return self.__node_ref - - def _set_node_ref(self, v, load=False): - """ - Setter method for node_ref, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point/node_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_ref() directly. - - YANG Description: This leaf identifies in which node the supporting -termination point is present. - """ - 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=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", - }) - - self.__node_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_ref(self): - self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - - - def _get_tp_ref(self): - """ - Getter method for tp_ref, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point/tp_ref (leafref) - - YANG Description: Reference to the underlay node (the underlay node must -be in a different topology). - """ - return self.__tp_ref - - def _set_tp_ref(self, v, load=False): - """ - Setter method for tp_ref, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point/tp_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tp_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tp_ref() directly. - - YANG Description: Reference to the underlay node (the underlay node must -be in a different topology). - """ - 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=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tp_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", - }) - - self.__tp_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_tp_ref(self): - self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - node_ref = __builtin__.property(_get_node_ref, _set_node_ref) - tp_ref = __builtin__.property(_get_tp_ref, _set_tp_ref) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('node_ref', node_ref), ('tp_ref', tp_ref), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/__init__.py deleted file mode 100644 index 4c7ab6264..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/__init__.py +++ /dev/null @@ -1,445 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import interface_switching_capability -from . import geolocation -from . import otn_ltp -from . import client_svc -class te(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/te. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Indicates TE support. - """ - __slots__ = ('_path_helper', '_extmethods', '__admin_status','__name','__interface_switching_capability','__inter_domain_plug_id','__inter_layer_lock_id','__oper_status','__geolocation','__otn_ltp','__client_svc',) - - _yang_name = 'te' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__inter_domain_plug_id = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="inter-domain-plug-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - self.__inter_layer_lock_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) - self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - self.__otn_ltp = YANGDynClass(base=otn_ltp.otn_ltp, is_container='container', yang_name="otn-ltp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__client_svc = YANGDynClass(base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'network', 'node', 'termination-point', 'te'] - - def _get_admin_status(self): - """ - Getter method for admin_status, mapped from YANG variable /networks/network/node/termination_point/te/admin_status (te-types:te-admin-status) - - YANG Description: The administrative state of the LTP. - """ - return self.__admin_status - - def _set_admin_status(self, v, load=False): - """ - Setter method for admin_status, mapped from YANG variable /networks/network/node/termination_point/te/admin_status (te-types:te-admin-status) - If this variable is read-only (config: false) in the - source YANG file, then _set_admin_status is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_admin_status() directly. - - YANG Description: The administrative state of the LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """admin_status must be of a type compatible with te-types:te-admin-status""", - 'defined-type': "te-types:te-admin-status", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True)""", - }) - - self.__admin_status = t - if hasattr(self, '_set'): - self._set() - - def _unset_admin_status(self): - self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/node/termination_point/te/name (string) - - YANG Description: A descriptive name for the LTP. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/node/termination_point/te/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: A descriptive name for the LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_interface_switching_capability(self): - """ - Getter method for interface_switching_capability, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability (list) - - YANG Description: List of ISCDs for this link. - """ - return self.__interface_switching_capability - - def _set_interface_switching_capability(self, v, load=False): - """ - Setter method for interface_switching_capability, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_interface_switching_capability is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_interface_switching_capability() directly. - - YANG Description: List of ISCDs for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """interface_switching_capability must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__interface_switching_capability = t - if hasattr(self, '_set'): - self._set() - - def _unset_interface_switching_capability(self): - self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_inter_domain_plug_id(self): - """ - Getter method for inter_domain_plug_id, mapped from YANG variable /networks/network/node/termination_point/te/inter_domain_plug_id (binary) - - YANG Description: A network-wide unique number that identifies on the -network a connection that supports a given inter-domain -TE link. This is a more flexible alternative to specifying -'remote-te-node-id' and 'remote-te-link-tp-id' on a TE link -when the provider either does not know 'remote-te-node-id' -and 'remote-te-link-tp-id' or needs to give the client the -flexibility to mix and match multiple topologies. - """ - return self.__inter_domain_plug_id - - def _set_inter_domain_plug_id(self, v, load=False): - """ - Setter method for inter_domain_plug_id, mapped from YANG variable /networks/network/node/termination_point/te/inter_domain_plug_id (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_inter_domain_plug_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_inter_domain_plug_id() directly. - - YANG Description: A network-wide unique number that identifies on the -network a connection that supports a given inter-domain -TE link. This is a more flexible alternative to specifying -'remote-te-node-id' and 'remote-te-link-tp-id' on a TE link -when the provider either does not know 'remote-te-node-id' -and 'remote-te-link-tp-id' or needs to give the client the -flexibility to mix and match multiple topologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="inter-domain-plug-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """inter_domain_plug_id must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="inter-domain-plug-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__inter_domain_plug_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_inter_domain_plug_id(self): - self.__inter_domain_plug_id = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="inter-domain-plug-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - - def _get_inter_layer_lock_id(self): - """ - Getter method for inter_layer_lock_id, mapped from YANG variable /networks/network/node/termination_point/te/inter_layer_lock_id (uint32) - - YANG Description: Inter-layer lock ID, used for path computation in a TE -topology covering multiple layers or multiple regions. - """ - return self.__inter_layer_lock_id - - def _set_inter_layer_lock_id(self, v, load=False): - """ - Setter method for inter_layer_lock_id, mapped from YANG variable /networks/network/node/termination_point/te/inter_layer_lock_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_inter_layer_lock_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_inter_layer_lock_id() directly. - - YANG Description: Inter-layer lock ID, used for path computation in a TE -topology covering multiple layers or multiple regions. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """inter_layer_lock_id must be of a type compatible with uint32""", - 'defined-type': "uint32", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__inter_layer_lock_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_inter_layer_lock_id(self): - self.__inter_layer_lock_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_oper_status(self): - """ - Getter method for oper_status, mapped from YANG variable /networks/network/node/termination_point/te/oper_status (te-types:te-oper-status) - - YANG Description: The current operational state of the LTP. - """ - return self.__oper_status - - def _set_oper_status(self, v, load=False): - """ - Setter method for oper_status, mapped from YANG variable /networks/network/node/termination_point/te/oper_status (te-types:te-oper-status) - If this variable is read-only (config: false) in the - source YANG file, then _set_oper_status is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_oper_status() directly. - - YANG Description: The current operational state of the LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """oper_status must be of a type compatible with te-types:te-oper-status""", - 'defined-type': "te-types:te-oper-status", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False)""", - }) - - self.__oper_status = t - if hasattr(self, '_set'): - self._set() - - def _unset_oper_status(self): - self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) - - - def _get_geolocation(self): - """ - Getter method for geolocation, mapped from YANG variable /networks/network/node/termination_point/te/geolocation (container) - - YANG Description: Contains a GPS location. - """ - return self.__geolocation - - def _set_geolocation(self, v, load=False): - """ - Setter method for geolocation, mapped from YANG variable /networks/network/node/termination_point/te/geolocation (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_geolocation is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_geolocation() directly. - - YANG Description: Contains a GPS location. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """geolocation must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__geolocation = t - if hasattr(self, '_set'): - self._set() - - def _unset_geolocation(self): - self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - - def _get_otn_ltp(self): - """ - Getter method for otn_ltp, mapped from YANG variable /networks/network/node/termination_point/te/otn_ltp (container) - - YANG Description: Attributes of the OTN Link Termination Point (LTP). - """ - return self.__otn_ltp - - def _set_otn_ltp(self, v, load=False): - """ - Setter method for otn_ltp, mapped from YANG variable /networks/network/node/termination_point/te/otn_ltp (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn_ltp is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn_ltp() directly. - - YANG Description: Attributes of the OTN Link Termination Point (LTP). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn_ltp.otn_ltp, is_container='container', yang_name="otn-ltp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn_ltp must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn_ltp.otn_ltp, is_container='container', yang_name="otn-ltp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn_ltp = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn_ltp(self): - self.__otn_ltp = YANGDynClass(base=otn_ltp.otn_ltp, is_container='container', yang_name="otn-ltp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_client_svc(self): - """ - Getter method for client_svc, mapped from YANG variable /networks/network/node/termination_point/te/client_svc (container) - - YANG Description: OTN LTP Service attributes. - """ - return self.__client_svc - - def _set_client_svc(self, v, load=False): - """ - Setter method for client_svc, mapped from YANG variable /networks/network/node/termination_point/te/client_svc (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_client_svc is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_client_svc() directly. - - YANG Description: OTN LTP Service attributes. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """client_svc must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__client_svc = t - if hasattr(self, '_set'): - self._set() - - def _unset_client_svc(self): - self.__client_svc = YANGDynClass(base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - admin_status = __builtin__.property(_get_admin_status, _set_admin_status) - name = __builtin__.property(_get_name, _set_name) - interface_switching_capability = __builtin__.property(_get_interface_switching_capability, _set_interface_switching_capability) - inter_domain_plug_id = __builtin__.property(_get_inter_domain_plug_id, _set_inter_domain_plug_id) - inter_layer_lock_id = __builtin__.property(_get_inter_layer_lock_id, _set_inter_layer_lock_id) - oper_status = __builtin__.property(_get_oper_status) - geolocation = __builtin__.property(_get_geolocation) - otn_ltp = __builtin__.property(_get_otn_ltp, _set_otn_ltp) - client_svc = __builtin__.property(_get_client_svc, _set_client_svc) - - - _pyangbind_elements = OrderedDict([('admin_status', admin_status), ('name', name), ('interface_switching_capability', interface_switching_capability), ('inter_domain_plug_id', inter_domain_plug_id), ('inter_layer_lock_id', inter_layer_lock_id), ('oper_status', oper_status), ('geolocation', geolocation), ('otn_ltp', otn_ltp), ('client_svc', client_svc), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/client_svc/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/client_svc/__init__.py deleted file mode 100644 index 6dd0b2c13..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/client_svc/__init__.py +++ /dev/null @@ -1,115 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class client_svc(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/client-svc. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN LTP Service attributes. - """ - __slots__ = ('_path_helper', '_extmethods', '__supported_client_signal',) - - _yang_name = 'client-svc' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__supported_client_signal = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', 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 ['networks', 'network', 'node', 'termination-point', 'te', 'client-svc'] - - def _get_supported_client_signal(self): - """ - Getter method for supported_client_signal, mapped from YANG variable /networks/network/node/termination_point/te/client_svc/supported_client_signal (identityref) - - YANG Description: List of client signal types supported by the LTP. - """ - return self.__supported_client_signal - - def _set_supported_client_signal(self, v, load=False): - """ - Setter method for supported_client_signal, mapped from YANG variable /networks/network/node/termination_point/te/client_svc/supported_client_signal (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_supported_client_signal is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_supported_client_signal() directly. - - YANG Description: List of client signal types supported by the LTP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """supported_client_signal must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__supported_client_signal = t - if hasattr(self, '_set'): - self._set() - - def _unset_supported_client_signal(self): - self.__supported_client_signal = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - supported_client_signal = __builtin__.property(_get_supported_client_signal, _set_supported_client_signal) - - - _pyangbind_elements = OrderedDict([('supported_client_signal', supported_client_signal), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/geolocation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/geolocation/__init__.py deleted file mode 100644 index a02b6d62f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/geolocation/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class geolocation(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/geolocation. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains a GPS location. - """ - __slots__ = ('_path_helper', '_extmethods', '__altitude','__latitude','__longitude',) - - _yang_name = 'geolocation' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) - self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', 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 ['networks', 'network', 'node', 'termination-point', 'te', 'geolocation'] - - def _get_altitude(self): - """ - Getter method for altitude, mapped from YANG variable /networks/network/node/termination_point/te/geolocation/altitude (int64) - - YANG Description: Distance above sea level. - """ - return self.__altitude - - def _set_altitude(self, v, load=False): - """ - Setter method for altitude, mapped from YANG variable /networks/network/node/termination_point/te/geolocation/altitude (int64) - If this variable is read-only (config: false) in the - source YANG file, then _set_altitude is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_altitude() directly. - - YANG Description: Distance above sea level. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """altitude must be of a type compatible with int64""", - 'defined-type': "int64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False)""", - }) - - self.__altitude = t - if hasattr(self, '_set'): - self._set() - - def _unset_altitude(self): - self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) - - - def _get_latitude(self): - """ - Getter method for latitude, mapped from YANG variable /networks/network/node/termination_point/te/geolocation/latitude (geographic-coordinate-degree) - - YANG Description: Relative position north or south on the Earth's surface. - """ - return self.__latitude - - def _set_latitude(self, v, load=False): - """ - Setter method for latitude, mapped from YANG variable /networks/network/node/termination_point/te/geolocation/latitude (geographic-coordinate-degree) - If this variable is read-only (config: false) in the - source YANG file, then _set_latitude is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_latitude() directly. - - YANG Description: Relative position north or south on the Earth's surface. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """latitude must be of a type compatible with geographic-coordinate-degree""", - 'defined-type': "ietf-te-topology:geographic-coordinate-degree", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", - }) - - self.__latitude = t - if hasattr(self, '_set'): - self._set() - - def _unset_latitude(self): - self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - - - def _get_longitude(self): - """ - Getter method for longitude, mapped from YANG variable /networks/network/node/termination_point/te/geolocation/longitude (geographic-coordinate-degree) - - YANG Description: Angular distance east or west on the Earth's surface. - """ - return self.__longitude - - def _set_longitude(self, v, load=False): - """ - Setter method for longitude, mapped from YANG variable /networks/network/node/termination_point/te/geolocation/longitude (geographic-coordinate-degree) - If this variable is read-only (config: false) in the - source YANG file, then _set_longitude is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_longitude() directly. - - YANG Description: Angular distance east or west on the Earth's surface. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """longitude must be of a type compatible with geographic-coordinate-degree""", - 'defined-type': "ietf-te-topology:geographic-coordinate-degree", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", - }) - - self.__longitude = t - if hasattr(self, '_set'): - self._set() - - def _unset_longitude(self): - self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - - altitude = __builtin__.property(_get_altitude) - latitude = __builtin__.property(_get_latitude) - longitude = __builtin__.property(_get_longitude) - - - _pyangbind_elements = OrderedDict([('altitude', altitude), ('latitude', latitude), ('longitude', longitude), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py deleted file mode 100644 index e158b30c3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py +++ /dev/null @@ -1,206 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import max_lsp_bandwidth -class interface_switching_capability(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/interface-switching-capability. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of ISCDs for this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__switching_capability','__encoding','__max_lsp_bandwidth',) - - _yang_name = 'interface-switching-capability' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'termination-point', 'te', 'interface-switching-capability'] - - def _get_switching_capability(self): - """ - Getter method for switching_capability, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/switching_capability (identityref) - - YANG Description: Switching capability for this interface. - """ - return self.__switching_capability - - def _set_switching_capability(self, v, load=False): - """ - Setter method for switching_capability, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/switching_capability (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_switching_capability is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_switching_capability() directly. - - YANG Description: Switching capability for this interface. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """switching_capability must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__switching_capability = t - if hasattr(self, '_set'): - self._set() - - def _unset_switching_capability(self): - self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_encoding(self): - """ - Getter method for encoding, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/encoding (identityref) - - YANG Description: Encoding supported by this interface. - """ - return self.__encoding - - def _set_encoding(self, v, load=False): - """ - Setter method for encoding, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/encoding (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_encoding is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_encoding() directly. - - YANG Description: Encoding supported by this interface. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """encoding must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__encoding = t - if hasattr(self, '_set'): - self._set() - - def _unset_encoding(self): - self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_max_lsp_bandwidth(self): - """ - Getter method for max_lsp_bandwidth, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth (list) - - YANG Description: Maximum Label Switched Path (LSP) bandwidth at -priorities 0-7. - """ - return self.__max_lsp_bandwidth - - def _set_max_lsp_bandwidth(self, v, load=False): - """ - Setter method for max_lsp_bandwidth, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_lsp_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_lsp_bandwidth() directly. - - YANG Description: Maximum Label Switched Path (LSP) bandwidth at -priorities 0-7. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_lsp_bandwidth must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__max_lsp_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_lsp_bandwidth(self): - self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - switching_capability = __builtin__.property(_get_switching_capability, _set_switching_capability) - encoding = __builtin__.property(_get_encoding, _set_encoding) - max_lsp_bandwidth = __builtin__.property(_get_max_lsp_bandwidth, _set_max_lsp_bandwidth) - - - _pyangbind_elements = OrderedDict([('switching_capability', switching_capability), ('encoding', encoding), ('max_lsp_bandwidth', max_lsp_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py deleted file mode 100644 index 429b0f18b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class max_lsp_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/interface-switching-capability/max-lsp-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum Label Switched Path (LSP) bandwidth at -priorities 0-7. - """ - __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) - - _yang_name = 'max-lsp-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'network', 'node', 'termination-point', 'te', 'interface-switching-capability', 'max-lsp-bandwidth'] - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/priority (uint8) - - YANG Description: Priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority. - """ - 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=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - priority = __builtin__.property(_get_priority, _set_priority) - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py deleted file mode 100644 index d0326e850..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/interface-switching-capability/max-lsp-bandwidth/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'network', 'node', 'termination-point', 'te', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) - - YANG Description: Maximum bandwidth attributes for OTN paths. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Maximum bandwidth attributes for OTN paths. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py deleted file mode 100644 index fcfb11adf..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,156 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/interface-switching-capability/max-lsp-bandwidth/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum bandwidth attributes for OTN paths. - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__max_ts_number',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'network', 'node', 'termination-point', 'te', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth', 'otn'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_max_ts_number(self): - """ - Getter method for max_ts_number, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) - - YANG Description: The maximum number of Tributary Slots (TS) that could be -used by an ODUflex LSP. - """ - return self.__max_ts_number - - def _set_max_ts_number(self, v, load=False): - """ - Setter method for max_ts_number, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_ts_number() directly. - - YANG Description: The maximum number of Tributary Slots (TS) that could be -used by an ODUflex LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__max_ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_ts_number(self): - self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - max_ts_number = __builtin__.property(_get_max_ts_number, _set_max_ts_number) - - __choices__ = {'technology': {'otn': ['odu_type', 'max_ts_number']}} - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('max_ts_number', max_ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/otn_ltp/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/otn_ltp/__init__.py deleted file mode 100644 index 55ef3745b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/node/termination_point/te/otn_ltp/__init__.py +++ /dev/null @@ -1,121 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn_ltp(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/otn-ltp. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Attributes of the OTN Link Termination Point (LTP). - """ - __slots__ = ('_path_helper', '_extmethods', '__odtu_flex_type',) - - _yang_name = 'otn-ltp' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', 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 ['networks', 'network', 'node', 'termination-point', 'te', 'otn-ltp'] - - def _get_odtu_flex_type(self): - """ - Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/termination_point/te/otn_ltp/odtu_flex_type (l1-types:odtu-flex-type) - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs set up -on this OTN Link Termination Point (LTP). - """ - return self.__odtu_flex_type - - def _set_odtu_flex_type(self, v, load=False): - """ - Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/termination_point/te/otn_ltp/odtu_flex_type (l1-types:odtu-flex-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_odtu_flex_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odtu_flex_type() directly. - - YANG Description: The type of Optical Data Tributary Unit (ODTU) -whose nominal bitrate is used to compute the number of -Tributary Slots (TS) required by the ODUflex LSPs set up -on this OTN Link Termination Point (LTP). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", - 'defined-type': "l1-types:odtu-flex-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", - }) - - self.__odtu_flex_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odtu_flex_type(self): - self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) - - odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) - - - _pyangbind_elements = OrderedDict([('odtu_flex_type', odtu_flex_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/supporting_network/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/supporting_network/__init__.py deleted file mode 100644 index 183db8264..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/supporting_network/__init__.py +++ /dev/null @@ -1,121 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class supporting_network(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/supporting-network. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: An underlay network, used to represent layered network -topologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref',) - - _yang_name = 'supporting-network' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', 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 ['networks', 'network', 'supporting-network'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/network/supporting_network/network_ref (leafref) - - YANG Description: References the underlay network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/network/supporting_network/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: References the underlay network. - """ - 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=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te/__init__.py deleted file mode 100644 index ac4025b54..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te/__init__.py +++ /dev/null @@ -1,283 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import nsrlg -from . import geolocation -class te(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/te. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Indicates TE support. - """ - __slots__ = ('_path_helper', '_extmethods', '__name','__preference','__optimization_criterion','__nsrlg','__geolocation',) - - _yang_name = 'te' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__optimization_criterion = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="optimization-criterion", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__nsrlg = YANGDynClass(base=YANGListType("id",nsrlg.nsrlg, yang_name="nsrlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="nsrlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', 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 ['networks', 'network', 'te'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/network/te/name (string) - - YANG Description: Name of the TE topology. This attribute is optional and can -be specified by the operator to describe the TE topology, -which can be useful when 'network-id' (RFC 8345) is not -descriptive and not modifiable because of being generated -by the system. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/network/te/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Name of the TE topology. This attribute is optional and can -be specified by the operator to describe the TE topology, -which can be useful when 'network-id' (RFC 8345) is not -descriptive and not modifiable because of being generated -by the system. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_preference(self): - """ - Getter method for preference, mapped from YANG variable /networks/network/te/preference (uint8) - - YANG Description: Specifies a preference for this topology. A lower number -indicates a higher preference. - """ - return self.__preference - - def _set_preference(self, v, load=False): - """ - Setter method for preference, mapped from YANG variable /networks/network/te/preference (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_preference is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_preference() directly. - - YANG Description: Specifies a preference for this topology. A lower number -indicates a higher preference. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """preference must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__preference = t - if hasattr(self, '_set'): - self._set() - - def _unset_preference(self): - self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_optimization_criterion(self): - """ - Getter method for optimization_criterion, mapped from YANG variable /networks/network/te/optimization_criterion (identityref) - - YANG Description: Optimization criterion applied to this topology. - """ - return self.__optimization_criterion - - def _set_optimization_criterion(self, v, load=False): - """ - Setter method for optimization_criterion, mapped from YANG variable /networks/network/te/optimization_criterion (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_optimization_criterion is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_optimization_criterion() directly. - - YANG Description: Optimization criterion applied to this topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="optimization-criterion", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """optimization_criterion must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="optimization-criterion", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__optimization_criterion = t - if hasattr(self, '_set'): - self._set() - - def _unset_optimization_criterion(self): - self.__optimization_criterion = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="optimization-criterion", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_nsrlg(self): - """ - Getter method for nsrlg, mapped from YANG variable /networks/network/te/nsrlg (list) - - YANG Description: List of NSRLGs (Non-Shared Risk Link Groups). - """ - return self.__nsrlg - - def _set_nsrlg(self, v, load=False): - """ - Setter method for nsrlg, mapped from YANG variable /networks/network/te/nsrlg (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_nsrlg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_nsrlg() directly. - - YANG Description: List of NSRLGs (Non-Shared Risk Link Groups). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("id",nsrlg.nsrlg, yang_name="nsrlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="nsrlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """nsrlg must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("id",nsrlg.nsrlg, yang_name="nsrlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="nsrlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__nsrlg = t - if hasattr(self, '_set'): - self._set() - - def _unset_nsrlg(self): - self.__nsrlg = YANGDynClass(base=YANGListType("id",nsrlg.nsrlg, yang_name="nsrlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="nsrlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_geolocation(self): - """ - Getter method for geolocation, mapped from YANG variable /networks/network/te/geolocation (container) - - YANG Description: Contains a GPS location. - """ - return self.__geolocation - - def _set_geolocation(self, v, load=False): - """ - Setter method for geolocation, mapped from YANG variable /networks/network/te/geolocation (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_geolocation is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_geolocation() directly. - - YANG Description: Contains a GPS location. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """geolocation must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", - }) - - self.__geolocation = t - if hasattr(self, '_set'): - self._set() - - def _unset_geolocation(self): - self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) - - name = __builtin__.property(_get_name, _set_name) - preference = __builtin__.property(_get_preference, _set_preference) - optimization_criterion = __builtin__.property(_get_optimization_criterion, _set_optimization_criterion) - nsrlg = __builtin__.property(_get_nsrlg, _set_nsrlg) - geolocation = __builtin__.property(_get_geolocation) - - - _pyangbind_elements = OrderedDict([('name', name), ('preference', preference), ('optimization_criterion', optimization_criterion), ('nsrlg', nsrlg), ('geolocation', geolocation), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te/geolocation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te/geolocation/__init__.py deleted file mode 100644 index b415c4e43..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te/geolocation/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class geolocation(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/te/geolocation. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains a GPS location. - """ - __slots__ = ('_path_helper', '_extmethods', '__altitude','__latitude','__longitude',) - - _yang_name = 'geolocation' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) - self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', 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 ['networks', 'network', 'te', 'geolocation'] - - def _get_altitude(self): - """ - Getter method for altitude, mapped from YANG variable /networks/network/te/geolocation/altitude (int64) - - YANG Description: Distance above sea level. - """ - return self.__altitude - - def _set_altitude(self, v, load=False): - """ - Setter method for altitude, mapped from YANG variable /networks/network/te/geolocation/altitude (int64) - If this variable is read-only (config: false) in the - source YANG file, then _set_altitude is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_altitude() directly. - - YANG Description: Distance above sea level. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """altitude must be of a type compatible with int64""", - 'defined-type': "int64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False)""", - }) - - self.__altitude = t - if hasattr(self, '_set'): - self._set() - - def _unset_altitude(self): - self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) - - - def _get_latitude(self): - """ - Getter method for latitude, mapped from YANG variable /networks/network/te/geolocation/latitude (geographic-coordinate-degree) - - YANG Description: Relative position north or south on the Earth's surface. - """ - return self.__latitude - - def _set_latitude(self, v, load=False): - """ - Setter method for latitude, mapped from YANG variable /networks/network/te/geolocation/latitude (geographic-coordinate-degree) - If this variable is read-only (config: false) in the - source YANG file, then _set_latitude is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_latitude() directly. - - YANG Description: Relative position north or south on the Earth's surface. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """latitude must be of a type compatible with geographic-coordinate-degree""", - 'defined-type': "ietf-te-topology:geographic-coordinate-degree", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", - }) - - self.__latitude = t - if hasattr(self, '_set'): - self._set() - - def _unset_latitude(self): - self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - - - def _get_longitude(self): - """ - Getter method for longitude, mapped from YANG variable /networks/network/te/geolocation/longitude (geographic-coordinate-degree) - - YANG Description: Angular distance east or west on the Earth's surface. - """ - return self.__longitude - - def _set_longitude(self, v, load=False): - """ - Setter method for longitude, mapped from YANG variable /networks/network/te/geolocation/longitude (geographic-coordinate-degree) - If this variable is read-only (config: false) in the - source YANG file, then _set_longitude is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_longitude() directly. - - YANG Description: Angular distance east or west on the Earth's surface. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """longitude must be of a type compatible with geographic-coordinate-degree""", - 'defined-type': "ietf-te-topology:geographic-coordinate-degree", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", - }) - - self.__longitude = t - if hasattr(self, '_set'): - self._set() - - def _unset_longitude(self): - self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) - - altitude = __builtin__.property(_get_altitude) - latitude = __builtin__.property(_get_latitude) - longitude = __builtin__.property(_get_longitude) - - - _pyangbind_elements = OrderedDict([('altitude', altitude), ('latitude', latitude), ('longitude', longitude), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te/nsrlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te/nsrlg/__init__.py deleted file mode 100644 index d905efa92..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te/nsrlg/__init__.py +++ /dev/null @@ -1,159 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class nsrlg(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/te/nsrlg. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of NSRLGs (Non-Shared Risk Link Groups). - """ - __slots__ = ('_path_helper', '_extmethods', '__id','__disjointness',) - - _yang_name = 'nsrlg' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-path-disjointness', 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 ['networks', 'network', 'te', 'nsrlg'] - - def _get_id(self): - """ - Getter method for id, mapped from YANG variable /networks/network/te/nsrlg/id (uint32) - - YANG Description: Identifies the NSRLG entry. - """ - return self.__id - - def _set_id(self, v, load=False): - """ - Setter method for id, mapped from YANG variable /networks/network/te/nsrlg/id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_id() directly. - - YANG Description: Identifies the NSRLG entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """id 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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__id = t - if hasattr(self, '_set'): - self._set() - - def _unset_id(self): - self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_disjointness(self): - """ - Getter method for disjointness, mapped from YANG variable /networks/network/te/nsrlg/disjointness (te-types:te-path-disjointness) - - YANG Description: The type of resource disjointness. - """ - return self.__disjointness - - def _set_disjointness(self, v, load=False): - """ - Setter method for disjointness, mapped from YANG variable /networks/network/te/nsrlg/disjointness (te-types:te-path-disjointness) - If this variable is read-only (config: false) in the - source YANG file, then _set_disjointness is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_disjointness() directly. - - YANG Description: The type of resource disjointness. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-path-disjointness', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """disjointness must be of a type compatible with te-types:te-path-disjointness""", - 'defined-type': "te-types:te-path-disjointness", - 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-path-disjointness', is_config=True)""", - }) - - self.__disjointness = t - if hasattr(self, '_set'): - self._set() - - def _unset_disjointness(self): - self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-path-disjointness', is_config=True) - - id = __builtin__.property(_get_id, _set_id) - disjointness = __builtin__.property(_get_disjointness, _set_disjointness) - - - _pyangbind_elements = OrderedDict([('id', id), ('disjointness', disjointness), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te_topology_identifier/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te_topology_identifier/__init__.py deleted file mode 100644 index 0e29c5c0c..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/network/te_topology_identifier/__init__.py +++ /dev/null @@ -1,205 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class te_topology_identifier(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/network/te-topology-identifier. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: TE topology identifier container. - """ - __slots__ = ('_path_helper', '_extmethods', '__provider_id','__client_id','__topology_id',) - - _yang_name = 'te-topology-identifier' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__provider_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="provider-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True) - self.__client_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="client-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True) - self.__topology_id = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'length': ['0']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([a-zA-Z0-9\\-_.]+:)*/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}),], default=six.text_type(""), is_leaf=True, yang_name="topology-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-topology-id', 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 ['networks', 'network', 'te-topology-identifier'] - - def _get_provider_id(self): - """ - Getter method for provider_id, mapped from YANG variable /networks/network/te_topology_identifier/provider_id (te-global-id) - - YANG Description: An identifier to uniquely identify a provider. -If omitted, it assumes that the topology provider ID -value = 0 (the default). - """ - return self.__provider_id - - def _set_provider_id(self, v, load=False): - """ - Setter method for provider_id, mapped from YANG variable /networks/network/te_topology_identifier/provider_id (te-global-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_provider_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_provider_id() directly. - - YANG Description: An identifier to uniquely identify a provider. -If omitted, it assumes that the topology provider ID -value = 0 (the default). - """ - 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="provider-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """provider_id must be of a type compatible with te-global-id""", - 'defined-type': "ietf-te-topology:te-global-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="provider-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True)""", - }) - - self.__provider_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_provider_id(self): - self.__provider_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="provider-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True) - - - def _get_client_id(self): - """ - Getter method for client_id, mapped from YANG variable /networks/network/te_topology_identifier/client_id (te-global-id) - - YANG Description: An identifier to uniquely identify a client. -If omitted, it assumes that the topology client ID -value = 0 (the default). - """ - return self.__client_id - - def _set_client_id(self, v, load=False): - """ - Setter method for client_id, mapped from YANG variable /networks/network/te_topology_identifier/client_id (te-global-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_client_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_client_id() directly. - - YANG Description: An identifier to uniquely identify a client. -If omitted, it assumes that the topology client ID -value = 0 (the default). - """ - 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="client-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """client_id must be of a type compatible with te-global-id""", - 'defined-type': "ietf-te-topology:te-global-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="client-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True)""", - }) - - self.__client_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_client_id(self): - self.__client_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="client-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True) - - - def _get_topology_id(self): - """ - Getter method for topology_id, mapped from YANG variable /networks/network/te_topology_identifier/topology_id (te-topology-id) - - YANG Description: When the datastore contains several topologies, -'topology-id' distinguishes between them. If omitted, -the default (empty) string for this leaf is assumed. - """ - return self.__topology_id - - def _set_topology_id(self, v, load=False): - """ - Setter method for topology_id, mapped from YANG variable /networks/network/te_topology_identifier/topology_id (te-topology-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_topology_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_topology_id() directly. - - YANG Description: When the datastore contains several topologies, -'topology-id' distinguishes between them. If omitted, -the default (empty) string for this leaf is assumed. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'length': ['0']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([a-zA-Z0-9\\-_.]+:)*/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}),], default=six.text_type(""), is_leaf=True, yang_name="topology-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-topology-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """topology_id must be of a type compatible with te-topology-id""", - 'defined-type': "ietf-te-topology:te-topology-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'length': ['0']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([a-zA-Z0-9\\-_.]+:)*/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}),], default=six.text_type(""), is_leaf=True, yang_name="topology-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-topology-id', is_config=True)""", - }) - - self.__topology_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_topology_id(self): - self.__topology_id = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'length': ['0']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([a-zA-Z0-9\\-_.]+:)*/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}),], default=six.text_type(""), is_leaf=True, yang_name="topology-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-topology-id', is_config=True) - - provider_id = __builtin__.property(_get_provider_id, _set_provider_id) - client_id = __builtin__.property(_get_client_id, _set_client_id) - topology_id = __builtin__.property(_get_topology_id, _set_topology_id) - - - _pyangbind_elements = OrderedDict([('provider_id', provider_id), ('client_id', client_id), ('topology_id', topology_id), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/__init__.py deleted file mode 100644 index f38ba7bb8..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import templates -class te(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Indicates TE support. - """ - __slots__ = ('_path_helper', '_extmethods', '__templates',) - - _yang_name = 'te' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__templates = YANGDynClass(base=templates.templates, is_container='container', yang_name="templates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te'] - - def _get_templates(self): - """ - Getter method for templates, mapped from YANG variable /networks/te/templates (container) - - YANG Description: Configuration parameters for templates used for a TE -topology. - """ - return self.__templates - - def _set_templates(self, v, load=False): - """ - Setter method for templates, mapped from YANG variable /networks/te/templates (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_templates is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_templates() directly. - - YANG Description: Configuration parameters for templates used for a TE -topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=templates.templates, is_container='container', yang_name="templates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """templates must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=templates.templates, is_container='container', yang_name="templates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__templates = t - if hasattr(self, '_set'): - self._set() - - def _unset_templates(self): - self.__templates = YANGDynClass(base=templates.templates, is_container='container', yang_name="templates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - templates = __builtin__.property(_get_templates, _set_templates) - - - _pyangbind_elements = OrderedDict([('templates', templates), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/__init__.py deleted file mode 100644 index 645419914..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import node_template -from . import link_template -class templates(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Configuration parameters for templates used for a TE -topology. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_template','__link_template',) - - _yang_name = 'templates' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_template = YANGDynClass(base=YANGListType("name",node_template.node_template, yang_name="node-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__link_template = YANGDynClass(base=YANGListType("name",link_template.link_template, yang_name="link-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates'] - - def _get_node_template(self): - """ - Getter method for node_template, mapped from YANG variable /networks/te/templates/node_template (list) - - YANG Description: The list of TE node templates used to define sharable -and reusable TE node attributes. - """ - return self.__node_template - - def _set_node_template(self, v, load=False): - """ - Setter method for node_template, mapped from YANG variable /networks/te/templates/node_template (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_template is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_template() directly. - - YANG Description: The list of TE node templates used to define sharable -and reusable TE node attributes. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",node_template.node_template, yang_name="node-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_template must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",node_template.node_template, yang_name="node-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__node_template = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_template(self): - self.__node_template = YANGDynClass(base=YANGListType("name",node_template.node_template, yang_name="node-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_link_template(self): - """ - Getter method for link_template, mapped from YANG variable /networks/te/templates/link_template (list) - - YANG Description: The list of TE link templates used to define sharable -and reusable TE link attributes. - """ - return self.__link_template - - def _set_link_template(self, v, load=False): - """ - Setter method for link_template, mapped from YANG variable /networks/te/templates/link_template (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_template is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_template() directly. - - YANG Description: The list of TE link templates used to define sharable -and reusable TE link attributes. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("name",link_template.link_template, yang_name="link-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_template must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("name",link_template.link_template, yang_name="link-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__link_template = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_template(self): - self.__link_template = YANGDynClass(base=YANGListType("name",link_template.link_template, yang_name="link-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - node_template = __builtin__.property(_get_node_template, _set_node_template) - link_template = __builtin__.property(_get_link_template, _set_link_template) - - - _pyangbind_elements = OrderedDict([('node_template', node_template), ('link_template', link_template), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/__init__.py deleted file mode 100644 index 132c4dbd3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/__init__.py +++ /dev/null @@ -1,251 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_link_attributes -class link_template(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The list of TE link templates used to define sharable -and reusable TE link attributes. - """ - __slots__ = ('_path_helper', '_extmethods', '__name','__priority','__reference_change_policy','__te_link_attributes',) - - _yang_name = 'link-template' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) - self.__reference_change_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - self.__te_link_attributes = YANGDynClass(base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/te/templates/link_template/name (te-types:te-template-name) - - YANG Description: The name to identify a TE link template. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/te/templates/link_template/name (te-types:te-template-name) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: The name to identify a TE link template. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with te-types:te-template-name""", - 'defined-type': "te-types:te-template-name", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/te/templates/link_template/priority (uint16) - - YANG Description: The preference value for resolving conflicts between -different templates. When two or more templates specify -values for one configuration attribute, the value from the -template with the highest priority is used. -A lower number indicates a higher priority. The highest -priority is 0. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/te/templates/link_template/priority (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: The preference value for resolving conflicts between -different templates. When two or more templates specify -values for one configuration attribute, the value from the -template with the highest priority is used. -A lower number indicates a higher priority. The highest -priority is 0. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) - - - def _get_reference_change_policy(self): - """ - Getter method for reference_change_policy, mapped from YANG variable /networks/te/templates/link_template/reference_change_policy (enumeration) - - YANG Description: This attribute specifies the action taken for a -configuration node that has a reference to this template. - """ - return self.__reference_change_policy - - def _set_reference_change_policy(self, v, load=False): - """ - Setter method for reference_change_policy, mapped from YANG variable /networks/te/templates/link_template/reference_change_policy (enumeration) - If this variable is read-only (config: false) in the - source YANG file, then _set_reference_change_policy is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_reference_change_policy() directly. - - YANG Description: This attribute specifies the action taken for a -configuration node that has a reference to this template. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """reference_change_policy must be of a type compatible with enumeration""", - 'defined-type': "ietf-te-topology:enumeration", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", - }) - - self.__reference_change_policy = t - if hasattr(self, '_set'): - self._set() - - def _unset_reference_change_policy(self): - self.__reference_change_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - - - def _get_te_link_attributes(self): - """ - Getter method for te_link_attributes, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes (container) - - YANG Description: Link attributes in a TE topology. - """ - return self.__te_link_attributes - - def _set_te_link_attributes(self, v, load=False): - """ - Setter method for te_link_attributes, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_link_attributes is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_link_attributes() directly. - - YANG Description: Link attributes in a TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_link_attributes must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_link_attributes = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_link_attributes(self): - self.__te_link_attributes = YANGDynClass(base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - name = __builtin__.property(_get_name, _set_name) - priority = __builtin__.property(_get_priority, _set_priority) - reference_change_policy = __builtin__.property(_get_reference_change_policy, _set_reference_change_policy) - te_link_attributes = __builtin__.property(_get_te_link_attributes, _set_te_link_attributes) - - - _pyangbind_elements = OrderedDict([('name', name), ('priority', priority), ('reference_change_policy', reference_change_policy), ('te_link_attributes', te_link_attributes), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py deleted file mode 100644 index b694dcce0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py +++ /dev/null @@ -1,858 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import external_domain -from . import underlay -from . import interface_switching_capability -from . import label_restrictions -from . import max_link_bandwidth -from . import max_resv_link_bandwidth -from . import unreserved_bandwidth -from . import te_srlgs -from . import te_nsrlgs -class te_link_attributes(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Link attributes in a TE topology. - """ - __slots__ = ('_path_helper', '_extmethods', '__access_type','__external_domain','__is_abstract','__name','__underlay','__admin_status','__link_index','__administrative_group','__interface_switching_capability','__label_restrictions','__link_protection_type','__max_link_bandwidth','__max_resv_link_bandwidth','__unreserved_bandwidth','__te_default_metric','__te_delay_metric','__te_igp_metric','__te_srlgs','__te_nsrlgs',) - - _yang_name = 'te-link-attributes' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__access_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True) - self.__external_domain = YANGDynClass(base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - self.__link_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - self.__administrative_group = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True) - self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__link_protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__max_link_bandwidth = YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__max_resv_link_bandwidth = YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__te_default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__te_delay_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__te_igp_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__te_srlgs = YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__te_nsrlgs = YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes'] - - def _get_access_type(self): - """ - Getter method for access_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/access_type (te-types:te-link-access-type) - - YANG Description: Link access type, which can be point-to-point or -multi-access. - """ - return self.__access_type - - def _set_access_type(self, v, load=False): - """ - Setter method for access_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/access_type (te-types:te-link-access-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_access_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_access_type() directly. - - YANG Description: Link access type, which can be point-to-point or -multi-access. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """access_type must be of a type compatible with te-types:te-link-access-type""", - 'defined-type': "te-types:te-link-access-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True)""", - }) - - self.__access_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_access_type(self): - self.__access_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True) - - - def _get_external_domain(self): - """ - Getter method for external_domain, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain (container) - - YANG Description: For an inter-domain link, specifies the attributes of -the remote end of the link, to facilitate the signaling at -the local end. - """ - return self.__external_domain - - def _set_external_domain(self, v, load=False): - """ - Setter method for external_domain, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_external_domain is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_external_domain() directly. - - YANG Description: For an inter-domain link, specifies the attributes of -the remote end of the link, to facilitate the signaling at -the local end. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """external_domain must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__external_domain = t - if hasattr(self, '_set'): - self._set() - - def _unset_external_domain(self): - self.__external_domain = YANGDynClass(base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_is_abstract(self): - """ - Getter method for is_abstract, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/is_abstract (empty) - - YANG Description: Present if the link is abstract. - """ - return self.__is_abstract - - def _set_is_abstract(self, v, load=False): - """ - Setter method for is_abstract, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/is_abstract (empty) - If this variable is read-only (config: false) in the - source YANG file, then _set_is_abstract is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_is_abstract() directly. - - YANG Description: Present if the link is abstract. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """is_abstract must be of a type compatible with empty""", - 'defined-type': "empty", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True)""", - }) - - self.__is_abstract = t - if hasattr(self, '_set'): - self._set() - - def _unset_is_abstract(self): - self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) - - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/name (string) - - YANG Description: Link name. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Link name. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_underlay(self): - """ - Getter method for underlay, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay (container) - - YANG Description: Attributes of the TE link underlay. - """ - return self.__underlay - - def _set_underlay(self, v, load=False): - """ - Setter method for underlay, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_underlay is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_underlay() directly. - - YANG Description: Attributes of the TE link underlay. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """underlay must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__underlay = t - if hasattr(self, '_set'): - self._set() - - def _unset_underlay(self): - self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_admin_status(self): - """ - Getter method for admin_status, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/admin_status (te-types:te-admin-status) - - YANG Description: The administrative state of the link. - """ - return self.__admin_status - - def _set_admin_status(self, v, load=False): - """ - Setter method for admin_status, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/admin_status (te-types:te-admin-status) - If this variable is read-only (config: false) in the - source YANG file, then _set_admin_status is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_admin_status() directly. - - YANG Description: The administrative state of the link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """admin_status must be of a type compatible with te-types:te-admin-status""", - 'defined-type': "te-types:te-admin-status", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True)""", - }) - - self.__admin_status = t - if hasattr(self, '_set'): - self._set() - - def _unset_admin_status(self): - self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - - - def _get_link_index(self): - """ - Getter method for link_index, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/link_index (uint64) - - YANG Description: The link identifier. If OSPF is used, this object -represents an ospfLsdbID. If IS-IS is used, this object -represents an isisLSPID. If a locally configured link is -used, this object represents a unique value, which is -locally defined in a router. - """ - return self.__link_index - - def _set_link_index(self, v, load=False): - """ - Setter method for link_index, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/link_index (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_index() directly. - - YANG Description: The link identifier. If OSPF is used, this object -represents an ospfLsdbID. If IS-IS is used, this object -represents an isisLSPID. If a locally configured link is -used, this object represents a unique value, which is -locally defined in a router. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_index must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__link_index = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_index(self): - self.__link_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) - - - def _get_administrative_group(self): - """ - Getter method for administrative_group, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/administrative_group (te-types:admin-groups) - - YANG Description: Administrative group or color of the link. -This attribute covers both administrative groups (defined -in RFCs 3630 and 5305) and Extended Administrative Groups -(defined in RFC 7308). - """ - return self.__administrative_group - - def _set_administrative_group(self, v, load=False): - """ - Setter method for administrative_group, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/administrative_group (te-types:admin-groups) - If this variable is read-only (config: false) in the - source YANG file, then _set_administrative_group is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_administrative_group() directly. - - YANG Description: Administrative group or color of the link. -This attribute covers both administrative groups (defined -in RFCs 3630 and 5305) and Extended Administrative Groups -(defined in RFC 7308). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """administrative_group must be of a type compatible with te-types:admin-groups""", - 'defined-type': "te-types:admin-groups", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True)""", - }) - - self.__administrative_group = t - if hasattr(self, '_set'): - self._set() - - def _unset_administrative_group(self): - self.__administrative_group = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True) - - - def _get_interface_switching_capability(self): - """ - Getter method for interface_switching_capability, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability (list) - - YANG Description: List of ISCDs for this link. - """ - return self.__interface_switching_capability - - def _set_interface_switching_capability(self, v, load=False): - """ - Setter method for interface_switching_capability, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_interface_switching_capability is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_interface_switching_capability() directly. - - YANG Description: List of ISCDs for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """interface_switching_capability must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__interface_switching_capability = t - if hasattr(self, '_set'): - self._set() - - def _unset_interface_switching_capability(self): - self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_label_restrictions(self): - """ - Getter method for label_restrictions, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions (container) - - YANG Description: The label restrictions container. - """ - return self.__label_restrictions - - def _set_label_restrictions(self, v, load=False): - """ - Setter method for label_restrictions, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restrictions is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restrictions() directly. - - YANG Description: The label restrictions container. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restrictions must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_restrictions = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restrictions(self): - self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_link_protection_type(self): - """ - Getter method for link_protection_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/link_protection_type (identityref) - - YANG Description: Link Protection Type desired for this link. - """ - return self.__link_protection_type - - def _set_link_protection_type(self, v, load=False): - """ - Setter method for link_protection_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/link_protection_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_protection_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_protection_type() directly. - - YANG Description: Link Protection Type desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_protection_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__link_protection_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_protection_type(self): - self.__link_protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_max_link_bandwidth(self): - """ - Getter method for max_link_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth (container) - - YANG Description: Maximum bandwidth that can be seen on this link in this -direction. Units are in bytes per second. - """ - return self.__max_link_bandwidth - - def _set_max_link_bandwidth(self, v, load=False): - """ - Setter method for max_link_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_link_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_link_bandwidth() directly. - - YANG Description: Maximum bandwidth that can be seen on this link in this -direction. Units are in bytes per second. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_link_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__max_link_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_link_bandwidth(self): - self.__max_link_bandwidth = YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_max_resv_link_bandwidth(self): - """ - Getter method for max_resv_link_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth (container) - - YANG Description: Maximum amount of bandwidth that can be reserved in this -direction in this link. Units are in bytes per second. - """ - return self.__max_resv_link_bandwidth - - def _set_max_resv_link_bandwidth(self, v, load=False): - """ - Setter method for max_resv_link_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_resv_link_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_resv_link_bandwidth() directly. - - YANG Description: Maximum amount of bandwidth that can be reserved in this -direction in this link. Units are in bytes per second. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_resv_link_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__max_resv_link_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_resv_link_bandwidth(self): - self.__max_resv_link_bandwidth = YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unreserved_bandwidth(self): - """ - Getter method for unreserved_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth (list) - - YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in -bytes per second. - """ - return self.__unreserved_bandwidth - - def _set_unreserved_bandwidth(self, v, load=False): - """ - Setter method for unreserved_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_unreserved_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unreserved_bandwidth() directly. - - YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in -bytes per second. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unreserved_bandwidth must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__unreserved_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_unreserved_bandwidth(self): - self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_te_default_metric(self): - """ - Getter method for te_default_metric, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_default_metric (uint32) - - YANG Description: Traffic Engineering metric. - """ - return self.__te_default_metric - - def _set_te_default_metric(self, v, load=False): - """ - Setter method for te_default_metric, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_default_metric (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_default_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_default_metric() directly. - - YANG Description: Traffic Engineering metric. - """ - 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="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_default_metric 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="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__te_default_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_default_metric(self): - self.__te_default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_te_delay_metric(self): - """ - Getter method for te_delay_metric, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_delay_metric (uint32) - - YANG Description: Traffic Engineering delay metric. - """ - return self.__te_delay_metric - - def _set_te_delay_metric(self, v, load=False): - """ - Setter method for te_delay_metric, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_delay_metric (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_delay_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_delay_metric() directly. - - YANG Description: Traffic Engineering delay metric. - """ - 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="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_delay_metric 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="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__te_delay_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_delay_metric(self): - self.__te_delay_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_te_igp_metric(self): - """ - Getter method for te_igp_metric, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_igp_metric (uint32) - - YANG Description: IGP metric used for Traffic Engineering. - """ - return self.__te_igp_metric - - def _set_te_igp_metric(self, v, load=False): - """ - Setter method for te_igp_metric, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_igp_metric (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_igp_metric is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_igp_metric() directly. - - YANG Description: IGP metric used for Traffic Engineering. - """ - 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="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_igp_metric 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="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__te_igp_metric = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_igp_metric(self): - self.__te_igp_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_te_srlgs(self): - """ - Getter method for te_srlgs, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_srlgs (container) - - YANG Description: Contains a list of SRLGs. - """ - return self.__te_srlgs - - def _set_te_srlgs(self, v, load=False): - """ - Setter method for te_srlgs, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_srlgs (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_srlgs is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_srlgs() directly. - - YANG Description: Contains a list of SRLGs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_srlgs must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_srlgs = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_srlgs(self): - self.__te_srlgs = YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_te_nsrlgs(self): - """ - Getter method for te_nsrlgs, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_nsrlgs (container) - - YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). -When an abstract TE link is configured, this list specifies -the request that underlay TE paths need to be mutually -disjoint with other TE links in the same groups. - """ - return self.__te_nsrlgs - - def _set_te_nsrlgs(self, v, load=False): - """ - Setter method for te_nsrlgs, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_nsrlgs (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_nsrlgs is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_nsrlgs() directly. - - YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). -When an abstract TE link is configured, this list specifies -the request that underlay TE paths need to be mutually -disjoint with other TE links in the same groups. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_nsrlgs must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_nsrlgs = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_nsrlgs(self): - self.__te_nsrlgs = YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - access_type = __builtin__.property(_get_access_type, _set_access_type) - external_domain = __builtin__.property(_get_external_domain, _set_external_domain) - is_abstract = __builtin__.property(_get_is_abstract, _set_is_abstract) - name = __builtin__.property(_get_name, _set_name) - underlay = __builtin__.property(_get_underlay, _set_underlay) - admin_status = __builtin__.property(_get_admin_status, _set_admin_status) - link_index = __builtin__.property(_get_link_index, _set_link_index) - administrative_group = __builtin__.property(_get_administrative_group, _set_administrative_group) - interface_switching_capability = __builtin__.property(_get_interface_switching_capability, _set_interface_switching_capability) - label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) - link_protection_type = __builtin__.property(_get_link_protection_type, _set_link_protection_type) - max_link_bandwidth = __builtin__.property(_get_max_link_bandwidth, _set_max_link_bandwidth) - max_resv_link_bandwidth = __builtin__.property(_get_max_resv_link_bandwidth, _set_max_resv_link_bandwidth) - unreserved_bandwidth = __builtin__.property(_get_unreserved_bandwidth, _set_unreserved_bandwidth) - te_default_metric = __builtin__.property(_get_te_default_metric, _set_te_default_metric) - te_delay_metric = __builtin__.property(_get_te_delay_metric, _set_te_delay_metric) - te_igp_metric = __builtin__.property(_get_te_igp_metric, _set_te_igp_metric) - te_srlgs = __builtin__.property(_get_te_srlgs, _set_te_srlgs) - te_nsrlgs = __builtin__.property(_get_te_nsrlgs, _set_te_nsrlgs) - - - _pyangbind_elements = OrderedDict([('access_type', access_type), ('external_domain', external_domain), ('is_abstract', is_abstract), ('name', name), ('underlay', underlay), ('admin_status', admin_status), ('link_index', link_index), ('administrative_group', administrative_group), ('interface_switching_capability', interface_switching_capability), ('label_restrictions', label_restrictions), ('link_protection_type', link_protection_type), ('max_link_bandwidth', max_link_bandwidth), ('max_resv_link_bandwidth', max_resv_link_bandwidth), ('unreserved_bandwidth', unreserved_bandwidth), ('te_default_metric', te_default_metric), ('te_delay_metric', te_delay_metric), ('te_igp_metric', te_igp_metric), ('te_srlgs', te_srlgs), ('te_nsrlgs', te_nsrlgs), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py deleted file mode 100644 index 9d40db380..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py +++ /dev/null @@ -1,205 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class external_domain(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/external-domain. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: For an inter-domain link, specifies the attributes of -the remote end of the link, to facilitate the signaling at -the local end. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref','__remote_te_node_id','__remote_te_link_tp_id',) - - _yang_name = 'external-domain' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__remote_te_node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) - self.__remote_te_link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'external-domain'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_remote_te_node_id(self): - """ - Getter method for remote_te_node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain/remote_te_node_id (te-types:te-node-id) - - YANG Description: Remote TE node identifier, used together with -'remote-te-link-tp-id' to identify the remote Link -Termination Point (LTP) in a different domain. - """ - return self.__remote_te_node_id - - def _set_remote_te_node_id(self, v, load=False): - """ - Setter method for remote_te_node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain/remote_te_node_id (te-types:te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_remote_te_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_remote_te_node_id() directly. - - YANG Description: Remote TE node identifier, used together with -'remote-te-link-tp-id' to identify the remote Link -Termination Point (LTP) in a different domain. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """remote_te_node_id must be of a type compatible with te-types:te-node-id""", - 'defined-type': "te-types:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True)""", - }) - - self.__remote_te_node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_remote_te_node_id(self): - self.__remote_te_node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) - - - def _get_remote_te_link_tp_id(self): - """ - Getter method for remote_te_link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain/remote_te_link_tp_id (te-types:te-tp-id) - - YANG Description: Remote TE LTP identifier, used together with -'remote-te-node-id' to identify the remote LTP in a -different domain. - """ - return self.__remote_te_link_tp_id - - def _set_remote_te_link_tp_id(self, v, load=False): - """ - Setter method for remote_te_link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain/remote_te_link_tp_id (te-types:te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_remote_te_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_remote_te_link_tp_id() directly. - - YANG Description: Remote TE LTP identifier, used together with -'remote-te-node-id' to identify the remote LTP in a -different domain. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """remote_te_link_tp_id must be of a type compatible with te-types:te-tp-id""", - 'defined-type': "te-types:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True)""", - }) - - self.__remote_te_link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_remote_te_link_tp_id(self): - self.__remote_te_link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - remote_te_node_id = __builtin__.property(_get_remote_te_node_id, _set_remote_te_node_id) - remote_te_link_tp_id = __builtin__.property(_get_remote_te_link_tp_id, _set_remote_te_link_tp_id) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('remote_te_node_id', remote_te_node_id), ('remote_te_link_tp_id', remote_te_link_tp_id), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py deleted file mode 100644 index ce33e949d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py +++ /dev/null @@ -1,206 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import max_lsp_bandwidth -class interface_switching_capability(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/interface-switching-capability. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: List of ISCDs for this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__switching_capability','__encoding','__max_lsp_bandwidth',) - - _yang_name = 'interface-switching-capability' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'interface-switching-capability'] - - def _get_switching_capability(self): - """ - Getter method for switching_capability, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/switching_capability (identityref) - - YANG Description: Switching capability for this interface. - """ - return self.__switching_capability - - def _set_switching_capability(self, v, load=False): - """ - Setter method for switching_capability, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/switching_capability (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_switching_capability is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_switching_capability() directly. - - YANG Description: Switching capability for this interface. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """switching_capability must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__switching_capability = t - if hasattr(self, '_set'): - self._set() - - def _unset_switching_capability(self): - self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_encoding(self): - """ - Getter method for encoding, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/encoding (identityref) - - YANG Description: Encoding supported by this interface. - """ - return self.__encoding - - def _set_encoding(self, v, load=False): - """ - Setter method for encoding, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/encoding (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_encoding is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_encoding() directly. - - YANG Description: Encoding supported by this interface. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """encoding must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__encoding = t - if hasattr(self, '_set'): - self._set() - - def _unset_encoding(self): - self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_max_lsp_bandwidth(self): - """ - Getter method for max_lsp_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth (list) - - YANG Description: Maximum Label Switched Path (LSP) bandwidth at -priorities 0-7. - """ - return self.__max_lsp_bandwidth - - def _set_max_lsp_bandwidth(self, v, load=False): - """ - Setter method for max_lsp_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_lsp_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_lsp_bandwidth() directly. - - YANG Description: Maximum Label Switched Path (LSP) bandwidth at -priorities 0-7. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_lsp_bandwidth must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__max_lsp_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_lsp_bandwidth(self): - self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - switching_capability = __builtin__.property(_get_switching_capability, _set_switching_capability) - encoding = __builtin__.property(_get_encoding, _set_encoding) - max_lsp_bandwidth = __builtin__.property(_get_max_lsp_bandwidth, _set_max_lsp_bandwidth) - - - _pyangbind_elements = OrderedDict([('switching_capability', switching_capability), ('encoding', encoding), ('max_lsp_bandwidth', max_lsp_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py deleted file mode 100644 index 976aba241..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class max_lsp_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/interface-switching-capability/max-lsp-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum Label Switched Path (LSP) bandwidth at -priorities 0-7. - """ - __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) - - _yang_name = 'max-lsp-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'interface-switching-capability', 'max-lsp-bandwidth'] - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/priority (uint8) - - YANG Description: Priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority. - """ - 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=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - priority = __builtin__.property(_get_priority, _set_priority) - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py deleted file mode 100644 index f4549d5df..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/interface-switching-capability/max-lsp-bandwidth/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) - - YANG Description: Maximum bandwidth attributes for OTN paths. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Maximum bandwidth attributes for OTN paths. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py deleted file mode 100644 index d630e8317..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,156 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/interface-switching-capability/max-lsp-bandwidth/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum bandwidth attributes for OTN paths. - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__max_ts_number',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth', 'otn'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_max_ts_number(self): - """ - Getter method for max_ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) - - YANG Description: The maximum number of Tributary Slots (TS) that could be -used by an ODUflex LSP. - """ - return self.__max_ts_number - - def _set_max_ts_number(self, v, load=False): - """ - Setter method for max_ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_max_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_max_ts_number() directly. - - YANG Description: The maximum number of Tributary Slots (TS) that could be -used by an ODUflex LSP. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """max_ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__max_ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_max_ts_number(self): - self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - max_ts_number = __builtin__.property(_get_max_ts_number, _set_max_ts_number) - - __choices__ = {'technology': {'otn': ['odu_type', 'max_ts_number']}} - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('max_ts_number', max_ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py deleted file mode 100644 index c3f81b42b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_restriction -class label_restrictions(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The label restrictions container. - """ - __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) - - _yang_name = 'label-restrictions' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions'] - - def _get_label_restriction(self): - """ - Getter method for label_restriction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction (list) - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - return self.__label_restriction - - def _set_label_restriction(self, v, load=False): - """ - Setter method for label_restriction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_restriction() directly. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_restriction must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__label_restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_restriction(self): - self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) - - - _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py deleted file mode 100644 index aff15591b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py +++ /dev/null @@ -1,450 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import label_start -from . import label_end -from . import label_step -from . import otn_label_range -from . import ethernet_label_range -class label_restriction(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The absence of the label restrictions container implies -that all labels are acceptable; otherwise, only restricted -labels are available. - """ - __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) - - _yang_name = 'label-restriction' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction'] - - def _get_restriction(self): - """ - Getter method for restriction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/restriction (enumeration) - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - return self.__restriction - - def _set_restriction(self, v, load=False): - """ - Setter method for restriction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/restriction (enumeration) - If this variable is read-only (config: false) in the - source YANG file, then _set_restriction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_restriction() directly. - - YANG Description: Indicates whether the list item is inclusive or exclusive. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """restriction must be of a type compatible with enumeration""", - 'defined-type': "ietf-te-topology:enumeration", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", - }) - - self.__restriction = t - if hasattr(self, '_set'): - self._set() - - def _unset_restriction(self): - self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/index (uint32) - - YANG Description: The index of the label restriction list entry. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: The index of the label restriction list entry. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_label_start(self): - """ - Getter method for label_start, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start (container) - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - return self.__label_start - - def _set_label_start(self, v, load=False): - """ - Setter method for label_start, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_start is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_start() directly. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_start must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_start = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_start(self): - self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_end(self): - """ - Getter method for label_end, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end (container) - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - return self.__label_end - - def _set_label_end(self, v, load=False): - """ - Setter method for label_end, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_end is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_end() directly. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_end must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_end = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_end(self): - self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_step(self): - """ - Getter method for label_step, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step (container) - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - return self.__label_step - - def _set_label_step(self, v, load=False): - """ - Setter method for label_step, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_step() directly. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_step must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_step(self): - self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_range_bitmap(self): - """ - Getter method for range_bitmap, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - return self.__range_bitmap - - def _set_range_bitmap(self, v, load=False): - """ - Setter method for range_bitmap, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/range_bitmap (yang:hex-string) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_bitmap is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_bitmap() directly. - - YANG Description: When there are gaps between 'label-start' and 'label-end', -this attribute is used to specify the positions -of the used labels. This is represented in big endian as -'hex-string'. -The most significant byte in the hex-string is the farthest -to the left in the byte sequence. Leading zero bytes in the -configured value may be omitted for brevity. -Each bit position in the 'range-bitmap' 'hex-string' maps -to a label in the range derived from 'label-start'. - -For example, assuming that 'label-start' = 16000 and -'range-bitmap' = 0x01000001, then: - -- bit position (0) is set, and the corresponding mapped - label from the range is 16000 + (0 * 'label-step') or - 16000 for default 'label-step' = 1. -- bit position (24) is set, and the corresponding mapped - label from the range is 16000 + (24 * 'label-step') or - 16024 for default 'label-step' = 1. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", - 'defined-type': "yang:hex-string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", - }) - - self.__range_bitmap = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_bitmap(self): - self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) - - - def _get_otn_label_range(self): - """ - Getter method for otn_label_range, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range (container) - - YANG Description: Label range information for OTN. - """ - return self.__otn_label_range - - def _set_otn_label_range(self, v, load=False): - """ - Setter method for otn_label_range, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn_label_range() directly. - - YANG Description: Label range information for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn_label_range(self): - self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_ethernet_label_range(self): - """ - Getter method for ethernet_label_range, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range (container) - - YANG Description: Ethernet-specific label range related information. - """ - return self.__ethernet_label_range - - def _set_ethernet_label_range(self, v, load=False): - """ - Setter method for ethernet_label_range, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_ethernet_label_range is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ethernet_label_range() directly. - - YANG Description: Ethernet-specific label range related information. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ethernet_label_range must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", - }) - - self.__ethernet_label_range = t - if hasattr(self, '_set'): - self._set() - - def _unset_ethernet_label_range(self): - self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) - - restriction = __builtin__.property(_get_restriction, _set_restriction) - index = __builtin__.property(_get_index, _set_index) - label_start = __builtin__.property(_get_label_start, _set_label_start) - label_end = __builtin__.property(_get_label_end, _set_label_end) - label_step = __builtin__.property(_get_label_step, _set_label_step) - range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) - otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) - ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) - - - _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py deleted file mode 100644 index eae880f42..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class ethernet_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/ethernet-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Ethernet-specific label range related information. - """ - __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) - - _yang_name = 'ethernet-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] - - def _get_tag_type(self): - """ - Getter method for tag_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - - YANG Description: VLAN tag type. - """ - return self.__tag_type - - def _set_tag_type(self, v, load=False): - """ - Setter method for tag_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_tag_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tag_type() directly. - - YANG Description: VLAN tag type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", - 'defined-type': "etht-types:eth-tag-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", - }) - - self.__tag_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_tag_type(self): - self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - - YANG Description: priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: priority. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) - - tag_type = __builtin__.property(_get_tag_type, _set_tag_type) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py deleted file mode 100644 index e9e68e828..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_end(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-end. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the ending label if a label range is specified. -This attribute is not set if a single label is specified. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-end' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-end'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py deleted file mode 100644 index 1fdead5d2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-end/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py deleted file mode 100644 index c0cf47b54..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py deleted file mode 100644 index c9b398df7..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_start(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-start. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: This is the starting label if a label range is specified. -This is the label value if a single label is specified, -in which case the 'label-end' attribute is not set. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-start' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-start'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py deleted file mode 100644 index bbd976bc9..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-start/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn (container) - - YANG Description: Label start or label end for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label start or label end for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py deleted file mode 100644 index 900ca9468..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label start or label end for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - - YANG Description: Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py deleted file mode 100644 index 8b580328d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class label_step(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-step. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The step increment between labels in the label range. -The label start/end values will have to be consistent -with the sign of label step. For example, -'label-start' < 'label-end' enforces 'label-step' > 0 -'label-start' > 'label-end' enforces 'label-step' < 0. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) - - _yang_name = 'label-step' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-step'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/generic (int32) - - YANG Description: Label range step. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/generic (int32) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Label range step. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with int32""", - 'defined-type': "int32", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn (container) - - YANG Description: Label step for OTN - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label step for OTN - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_step(self): - """ - Getter method for eth_step, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/eth_step (uint16) - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - return self.__eth_step - - def _set_eth_step(self, v, load=False): - """ - Setter method for eth_step, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/eth_step (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_step is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_step() directly. - - YANG Description: Label step which represent possible increments for -an Ethernet VLAN tag. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_step must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", - }) - - self.__eth_step = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_step(self): - self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_step = __builtin__.property(_get_eth_step, _set_eth_step) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py deleted file mode 100644 index d47950a6b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-step/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label step for OTN - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Label step which represents possible increments for -Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_ts(self): - """ - Getter method for ts, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - return self.__ts - - def _set_ts(self, v, load=False): - """ - Setter method for ts, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts() directly. - - YANG Description: Label step which represents possible increments for -Tributary Slot (TS) number. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts must be of a type compatible with otn-ts""", - 'defined-type': "ietf-otn-topology:otn-ts", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", - }) - - self.__ts = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts(self): - self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - ts = __builtin__.property(_get_ts, _set_ts) - - __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py deleted file mode 100644 index 2a0404874..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py +++ /dev/null @@ -1,256 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn_label_range(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/otn-label-range. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label range information for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) - - _yang_name = 'otn-label-range' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'otn-label-range'] - - def _get_range_type(self): - """ - Getter method for range_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - return self.__range_type - - def _set_range_type(self, v, load=False): - """ - Setter method for range_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_range_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_range_type() directly. - - YANG Description: The type of range (e.g., TPN or TS) -to which the label range applies - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """range_type must be of a type compatible with otn-label-range-type""", - 'defined-type': "ietf-otn-topology:otn-label-range-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", - }) - - self.__range_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_range_type(self): - self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary slot granularity (TSG) to which the label range -applies. - -This leaf MUST be present when the range-type is TS. - -This leaf MAY be omitted when mapping an ODUk over an OTUk -Link. In this case the range-type is tpn, with only one -entry (ODUk), and the tpn range has only one value (1). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_odu_type_list(self): - """ - Getter method for odu_type_list, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - return self.__odu_type_list - - def _set_odu_type_list(self, v, load=False): - """ - Setter method for odu_type_list, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type_list() directly. - - YANG Description: List of ODU types to which the label range applies. - -An Empty odu-type-list means that the label range -applies to all the supported ODU types. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type_list must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type_list(self): - self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/priority (uint8) - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority in Interface Switching Capability -Descriptor (ISCD). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) - - range_type = __builtin__.property(_get_range_type, _set_range_type) - tsg = __builtin__.property(_get_tsg, _set_tsg) - odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) - priority = __builtin__.property(_get_priority, _set_priority) - - - _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py deleted file mode 100644 index d5fb70e3a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class max_link_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-link-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum bandwidth that can be seen on this link in this -direction. Units are in bytes per second. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth',) - - _yang_name = 'max-link-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-link-bandwidth'] - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py deleted file mode 100644 index 1d86069ed..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-link-bandwidth/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-link-bandwidth', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py deleted file mode 100644 index 4528f641f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-link-bandwidth/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-link-bandwidth', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - - odulist = __builtin__.property(_get_odulist, _set_odulist) - - - _pyangbind_elements = OrderedDict([('odulist', odulist), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index f17480835..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-link-bandwidth/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-link-bandwidth', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - number = __builtin__.property(_get_number, _set_number) - ts_number = __builtin__.property(_get_ts_number, _set_ts_number) - - - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py deleted file mode 100644 index 7f16f359f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class max_resv_link_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-resv-link-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Maximum amount of bandwidth that can be reserved in this -direction in this link. Units are in bytes per second. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth',) - - _yang_name = 'max-resv-link-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-resv-link-bandwidth'] - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py deleted file mode 100644 index f781d9af5..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-resv-link-bandwidth/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-resv-link-bandwidth', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py deleted file mode 100644 index eee723135..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-resv-link-bandwidth/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-resv-link-bandwidth', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - - odulist = __builtin__.property(_get_odulist, _set_odulist) - - - _pyangbind_elements = OrderedDict([('odulist', odulist), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index 98d18da30..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-resv-link-bandwidth/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-resv-link-bandwidth', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - number = __builtin__.property(_get_number, _set_number) - ts_number = __builtin__.property(_get_ts_number, _set_ts_number) - - - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py deleted file mode 100644 index a3ab4519d..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class te_nsrlgs(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/te-nsrlgs. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). -When an abstract TE link is configured, this list specifies -the request that underlay TE paths need to be mutually -disjoint with other TE links in the same groups. - """ - __slots__ = ('_path_helper', '_extmethods', '__id',) - - _yang_name = 'te-nsrlgs' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'te-nsrlgs'] - - def _get_id(self): - """ - Getter method for id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_nsrlgs/id (uint32) - - YANG Description: NSRLG ID, uniquely configured within a topology. - """ - return self.__id - - def _set_id(self, v, load=False): - """ - Setter method for id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_nsrlgs/id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_id() directly. - - YANG Description: NSRLG ID, uniquely configured within a topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """id must be of a type compatible with uint32""", - 'defined-type': "uint32", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__id = t - if hasattr(self, '_set'): - self._set() - - def _unset_id(self): - self.__id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - id = __builtin__.property(_get_id, _set_id) - - - _pyangbind_elements = OrderedDict([('id', id), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py deleted file mode 100644 index 65f81a17e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py +++ /dev/null @@ -1,115 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class te_srlgs(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/te-srlgs. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains a list of SRLGs. - """ - __slots__ = ('_path_helper', '_extmethods', '__value',) - - _yang_name = 'te-srlgs' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'te-srlgs'] - - def _get_value(self): - """ - Getter method for value, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_srlgs/value (te-types:srlg) - - YANG Description: SRLG value. - """ - return self.__value - - def _set_value(self, v, load=False): - """ - Setter method for value, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_srlgs/value (te-types:srlg) - If this variable is read-only (config: false) in the - source YANG file, then _set_value is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_value() directly. - - YANG Description: SRLG value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """value must be of a type compatible with te-types:srlg""", - 'defined-type': "te-types:srlg", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True)""", - }) - - self.__value = t - if hasattr(self, '_set'): - self._set() - - def _unset_value(self): - self.__value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True) - - value = __builtin__.property(_get_value, _set_value) - - - _pyangbind_elements = OrderedDict([('value', value), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py deleted file mode 100644 index a1b69d2e2..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py +++ /dev/null @@ -1,326 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import primary_path -from . import backup_path -from . import tunnel_termination_points -from . import tunnels -class underlay(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Attributes of the TE link underlay. - """ - __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) - - _yang_name = 'underlay' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay'] - - def _get_enabled(self): - """ - Getter method for enabled, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/enabled (boolean) - - YANG Description: 'true' if the underlay is enabled. -'false' if the underlay is disabled. - """ - return self.__enabled - - def _set_enabled(self, v, load=False): - """ - Setter method for enabled, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/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: 'true' if the underlay is enabled. -'false' if the underlay is 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - 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='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_primary_path(self): - """ - Getter method for primary_path, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path (container) - - YANG Description: The service path on the underlay topology that -supports this link. - """ - return self.__primary_path - - def _set_primary_path(self, v, load=False): - """ - Setter method for primary_path, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_primary_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_primary_path() directly. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """primary_path must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__primary_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_primary_path(self): - self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_backup_path(self): - """ - Getter method for backup_path, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path (list) - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - return self.__backup_path - - def _set_backup_path(self, v, load=False): - """ - Setter method for backup_path, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_backup_path is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_backup_path() directly. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """backup_path must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__backup_path = t - if hasattr(self, '_set'): - self._set() - - def _unset_backup_path(self): - self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - - def _get_protection_type(self): - """ - Getter method for protection_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/protection_type (identityref) - - YANG Description: Underlay protection type desired for this link. - """ - return self.__protection_type - - def _set_protection_type(self, v, load=False): - """ - Setter method for protection_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/protection_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_protection_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_protection_type() directly. - - YANG Description: Underlay protection type desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """protection_type must be of a type compatible with identityref""", - 'defined-type': "ietf-te-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", - }) - - self.__protection_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_protection_type(self): - self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) - - - def _get_tunnel_termination_points(self): - """ - Getter method for tunnel_termination_points, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points (container) - - YANG Description: Underlay TTPs desired for this link. - """ - return self.__tunnel_termination_points - - def _set_tunnel_termination_points(self, v, load=False): - """ - Setter method for tunnel_termination_points, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_termination_points is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_termination_points() directly. - - YANG Description: Underlay TTPs desired for this link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_termination_points must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tunnel_termination_points = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_termination_points(self): - self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_tunnels(self): - """ - Getter method for tunnels, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels (container) - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - return self.__tunnels - - def _set_tunnels(self, v, load=False): - """ - Setter method for tunnels, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnels is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnels() directly. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnels must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__tunnels = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnels(self): - self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - enabled = __builtin__.property(_get_enabled, _set_enabled) - primary_path = __builtin__.property(_get_primary_path, _set_primary_path) - backup_path = __builtin__.property(_get_backup_path, _set_backup_path) - protection_type = __builtin__.property(_get_protection_type, _set_protection_type) - tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points, _set_tunnel_termination_points) - tunnels = __builtin__.property(_get_tunnels, _set_tunnels) - - - _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py deleted file mode 100644 index fe3e9714f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py +++ /dev/null @@ -1,207 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class backup_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of backup service paths on the underlay topology that -protect the underlay primary path. If the primary path is -not protected, the list contains zero elements. If the -primary path is protected, the list contains one or more -elements. - """ - __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) - - _yang_name = 'backup-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path'] - - def _get_index(self): - """ - Getter method for index, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/index (uint32) - - YANG Description: A sequence number to identify a backup path. - """ - return self.__index - - def _set_index(self, v, load=False): - """ - Setter method for index, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/index (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_index is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_index() directly. - - YANG Description: A sequence number to identify a backup path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__index = t - if hasattr(self, '_set'): - self._set() - - def _unset_index(self): - self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element (list) - - YANG Description: A list of path elements describing the backup service -path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the backup service -path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - index = __builtin__.property(_get_index, _set_index) - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - path_element = __builtin__.property(_get_path_element, _set_path_element) - - - _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py deleted file mode 100644 index 62e01431a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py +++ /dev/null @@ -1,321 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the backup service -path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index 25cce7314..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py deleted file mode 100644 index 602bbac44..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index 1cfac3e4f..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index 7510f12e3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index ebe98f0b0..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index 204c0ffd8..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index 49f6d8166..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py deleted file mode 100644 index 111fdc4e3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import path_element -class primary_path(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The service path on the underlay topology that -supports this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) - - _yang_name = 'primary-path' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - - def _get_path_element(self): - """ - Getter method for path_element, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element (list) - - YANG Description: A list of path elements describing the service path. - """ - return self.__path_element - - def _set_path_element(self, v, load=False): - """ - Setter method for path_element, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element() directly. - - YANG Description: A list of path elements describing the service path. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__path_element = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element(self): - self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - path_element = __builtin__.property(_get_path_element, _set_path_element) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py deleted file mode 100644 index 71c1bd0cc..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py +++ /dev/null @@ -1,320 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import numbered_node_hop -from . import numbered_link_hop -from . import unnumbered_link_hop -from . import as_number_hop -from . import label_hop -class path_element(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: A list of path elements describing the service path. - """ - __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) - - _yang_name = 'path-element' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element'] - - def _get_path_element_id(self): - """ - Getter method for path_element_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/path_element_id (uint32) - - YANG Description: To identify the element in a path. - """ - return self.__path_element_id - - def _set_path_element_id(self, v, load=False): - """ - Setter method for path_element_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/path_element_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_path_element_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_path_element_id() directly. - - YANG Description: To identify the element in a path. - """ - 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=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """path_element_id 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="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__path_element_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_path_element_id(self): - self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_numbered_node_hop(self): - """ - Getter method for numbered_node_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop (container) - - YANG Description: Numbered node route hop. - """ - return self.__numbered_node_hop - - def _set_numbered_node_hop(self, v, load=False): - """ - Setter method for numbered_node_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_node_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_node_hop() directly. - - YANG Description: Numbered node route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_node_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_node_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_node_hop(self): - self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_numbered_link_hop(self): - """ - Getter method for numbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop (container) - - YANG Description: Numbered link explicit route hop. - """ - return self.__numbered_link_hop - - def _set_numbered_link_hop(self, v, load=False): - """ - Setter method for numbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_numbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_numbered_link_hop() directly. - - YANG Description: Numbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """numbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__numbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_numbered_link_hop(self): - self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_unnumbered_link_hop(self): - """ - Getter method for unnumbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop (container) - - YANG Description: Unnumbered link explicit route hop. - """ - return self.__unnumbered_link_hop - - def _set_unnumbered_link_hop(self, v, load=False): - """ - Setter method for unnumbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_unnumbered_link_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_unnumbered_link_hop() directly. - - YANG Description: Unnumbered link explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """unnumbered_link_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__unnumbered_link_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_unnumbered_link_hop(self): - self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_as_number_hop(self): - """ - Getter method for as_number_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop (container) - - YANG Description: AS explicit route hop. - """ - return self.__as_number_hop - - def _set_as_number_hop(self, v, load=False): - """ - Setter method for as_number_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number_hop() directly. - - YANG Description: AS explicit route hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__as_number_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number_hop(self): - self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - - def _get_label_hop(self): - """ - Getter method for label_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop (container) - - YANG Description: Label hop type. - """ - return self.__label_hop - - def _set_label_hop(self, v, load=False): - """ - Setter method for label_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_label_hop is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_label_hop() directly. - - YANG Description: Label hop type. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """label_hop must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__label_hop = t - if hasattr(self, '_set'): - self._set() - - def _unset_label_hop(self): - self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) - numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) - numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) - unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) - as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) - label_hop = __builtin__.property(_get_label_hop, _set_label_hop) - - __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} - _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py deleted file mode 100644 index 37b1d287a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class as_number_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/as-number-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: AS explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) - - _yang_name = 'as-number-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] - - def _get_as_number(self): - """ - Getter method for as_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - - YANG Description: The Autonomous System (AS) number. - """ - return self.__as_number - - def _set_as_number(self, v, load=False): - """ - Setter method for as_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) - If this variable is read-only (config: false) in the - source YANG file, then _set_as_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_as_number() directly. - - YANG Description: The Autonomous System (AS) number. - """ - 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="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """as_number must be of a type compatible with inet:as-number""", - 'defined-type': "inet:as-number", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", - }) - - self.__as_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_as_number(self): - self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - as_number = __builtin__.property(_get_as_number, _set_as_number) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} - _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py deleted file mode 100644 index d2a98a8c6..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_label -class label_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/label-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop type. - """ - __slots__ = ('_path_helper', '_extmethods', '__te_label',) - - _yang_name = 'label-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'label-hop'] - - def _get_te_label(self): - """ - Getter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label (container) - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - return self.__te_label - - def _set_te_label(self, v, load=False): - """ - Setter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_label is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_label() directly. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_label must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_label = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_label(self): - self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - te_label = __builtin__.property(_get_te_label, _set_te_label) - - __choices__ = {'type': {'label': ['te_label']}} - _pyangbind_elements = OrderedDict([('te_label', te_label), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py deleted file mode 100644 index b61128cae..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_label(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/label-hop/te-label. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies the TE label. The choices can -be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) - - _yang_name = 'te-label' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - - YANG Description: TE label specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: TE label specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", - 'defined-type': "rt-types:generalized-label", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn (container) - - YANG Description: Label hop for OTN. - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Label hop for OTN. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_vlanid(self): - """ - Getter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - - YANG Description: VLAN tag id. - """ - return self.__vlanid - - def _set_vlanid(self, v, load=False): - """ - Setter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) - If this variable is read-only (config: false) in the - source YANG file, then _set_vlanid is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_vlanid() directly. - - YANG Description: VLAN tag id. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", - 'defined-type': "etht-types:vlanid", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", - }) - - self.__vlanid = t - if hasattr(self, '_set'): - self._set() - - def _unset_vlanid(self): - self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - - YANG Description: Label direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Label direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-label-direction""", - 'defined-type': "ietf-te-topology:te-label-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - vlanid = __builtin__.property(_get_vlanid, _set_vlanid) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py deleted file mode 100644 index c629a4834..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Label hop for OTN. - """ - __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] - - def _get_tpn(self): - """ - Getter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - - YANG Description: Tributary Port Number (TPN). - """ - return self.__tpn - - def _set_tpn(self, v, load=False): - """ - Setter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) - If this variable is read-only (config: false) in the - source YANG file, then _set_tpn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tpn() directly. - - YANG Description: Tributary Port Number (TPN). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tpn must be of a type compatible with otn-tpn""", - 'defined-type': "ietf-otn-topology:otn-tpn", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", - }) - - self.__tpn = t - if hasattr(self, '_set'): - self._set() - - def _unset_tpn(self): - self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) - - - def _get_tsg(self): - """ - Getter method for tsg, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - - YANG Description: Tributary Slot Granularity (TSG). - """ - return self.__tsg - - def _set_tsg(self, v, load=False): - """ - Setter method for tsg, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_tsg is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tsg() directly. - - YANG Description: Tributary Slot Granularity (TSG). - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tsg must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__tsg = t - if hasattr(self, '_set'): - self._set() - - def _unset_tsg(self): - self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_ts_list(self): - """ - Getter method for ts_list, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - return self.__ts_list - - def _set_ts_list(self, v, load=False): - """ - Setter method for ts_list, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_list is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_list() directly. - - YANG Description: A list of available Tributary Slots (TS) ranging - - - - -between 1 and 4095. If multiple values or -ranges are given, they all MUST be disjoint -and MUST be in ascending order. -For example 1-20,25,50-1000. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_list must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", - }) - - self.__ts_list = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_list(self): - self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) - - tpn = __builtin__.property(_get_tpn, _set_tpn) - tsg = __builtin__.property(_get_tsg, _set_tsg) - ts_list = __builtin__.property(_get_ts_list, _set_ts_list) - - __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} - _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py deleted file mode 100644 index b3b44095b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/numbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) - - _yang_name = 'numbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE Link Termination Point (LTP) identifier. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py deleted file mode 100644 index 4e0f06397..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class numbered_node_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/numbered-node-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Numbered node route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) - - _yang_name = 'numbered-node-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - - __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} - _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py deleted file mode 100644 index 6f04ec7fc..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py +++ /dev/null @@ -1,236 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class unnumbered_link_hop(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unnumbered link explicit route hop. - """ - __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) - - _yang_name = 'unnumbered-link-hop' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] - - def _get_link_tp_id(self): - """ - Getter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - return self.__link_tp_id - - def _set_link_tp_id(self, v, load=False): - """ - Setter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_link_tp_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_link_tp_id() directly. - - YANG Description: TE LTP identifier. The combination of the TE link ID -and the TE node ID is used to identify an unnumbered -TE link. - """ - 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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", - 'defined-type': "ietf-te-topology:te-tp-id", - 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", - }) - - self.__link_tp_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_link_tp_id(self): - self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) - - - def _get_node_id(self): - """ - Getter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - - YANG Description: The identifier of a node in the TE topology. - """ - return self.__node_id - - def _set_node_id(self, v, load=False): - """ - Setter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) - If this variable is read-only (config: false) in the - source YANG file, then _set_node_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_node_id() directly. - - YANG Description: The identifier of a node in the TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """node_id must be of a type compatible with te-node-id""", - 'defined-type': "ietf-te-topology:te-node-id", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", - }) - - self.__node_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_node_id(self): - self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) - - - def _get_hop_type(self): - """ - Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - - YANG Description: Strict or loose hop. - """ - return self.__hop_type - - def _set_hop_type(self, v, load=False): - """ - Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) - If this variable is read-only (config: false) in the - source YANG file, then _set_hop_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_hop_type() directly. - - YANG Description: Strict or loose hop. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """hop_type must be of a type compatible with te-hop-type""", - 'defined-type': "ietf-te-topology:te-hop-type", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", - }) - - self.__hop_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_hop_type(self): - self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) - - - def _get_direction(self): - """ - Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - - YANG Description: Link route object direction. - """ - return self.__direction - - def _set_direction(self, v, load=False): - """ - Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) - If this variable is read-only (config: false) in the - source YANG file, then _set_direction is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_direction() directly. - - YANG Description: Link route object direction. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """direction must be of a type compatible with te-link-direction""", - 'defined-type': "ietf-te-topology:te-link-direction", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", - }) - - self.__direction = t - if hasattr(self, '_set'): - self._set() - - def _unset_direction(self): - self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) - - link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) - node_id = __builtin__.property(_get_node_id, _set_node_id) - hop_type = __builtin__.property(_get_hop_type, _set_hop_type) - direction = __builtin__.property(_get_direction, _set_direction) - - __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} - _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py deleted file mode 100644 index 801aa8c42..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel_termination_points(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/tunnel-termination-points. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TTPs desired for this link. - """ - __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) - - _yang_name = 'tunnel-termination-points' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'tunnel-termination-points'] - - def _get_source(self): - """ - Getter method for source, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/source (binary) - - YANG Description: Source TTP identifier. - """ - return self.__source - - def _set_source(self, v, load=False): - """ - Setter method for source, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/source (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_source is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_source() directly. - - YANG Description: Source TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """source must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__source = t - if hasattr(self, '_set'): - self._set() - - def _unset_source(self): - self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - - def _get_destination(self): - """ - Getter method for destination, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/destination (binary) - - YANG Description: Destination TTP identifier. - """ - return self.__destination - - def _set_destination(self, v, load=False): - """ - Setter method for destination, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/destination (binary) - If this variable is read-only (config: false) in the - source YANG file, then _set_destination is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_destination() directly. - - YANG Description: Destination TTP identifier. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """destination must be of a type compatible with binary""", - 'defined-type': "binary", - 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", - }) - - self.__destination = t - if hasattr(self, '_set'): - self._set() - - def _unset_destination(self): - self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) - - source = __builtin__.property(_get_source, _set_source) - destination = __builtin__.property(_get_destination, _set_destination) - - - _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py deleted file mode 100644 index e2a5a218a..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py +++ /dev/null @@ -1,167 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import tunnel -class tunnels(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/tunnels. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Underlay TE tunnels supporting this TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) - - _yang_name = 'tunnels' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'tunnels'] - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. -This leaf is the default option for all TE tunnels -and may be overridden by the per-TE-tunnel value. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - - def _get_tunnel(self): - """ - Getter method for tunnel, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel (list) - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - return self.__tunnel - - def _set_tunnel(self, v, load=False): - """ - Setter method for tunnel, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel() directly. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", - }) - - self.__tunnel = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel(self): - self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) - - sharing = __builtin__.property(_get_sharing, _set_sharing) - tunnel = __builtin__.property(_get_tunnel, _set_tunnel) - - - _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py deleted file mode 100644 index 24bfd8831..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py +++ /dev/null @@ -1,170 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class tunnel(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/tunnels/tunnel. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Zero, one, or more underlay TE tunnels that support this -TE link. - """ - __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) - - _yang_name = 'tunnel' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'tunnels', 'tunnel'] - - def _get_tunnel_name(self): - """ - Getter method for tunnel_name, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/tunnel_name (string) - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - return self.__tunnel_name - - def _set_tunnel_name(self, v, load=False): - """ - Setter method for tunnel_name, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/tunnel_name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_tunnel_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_tunnel_name() directly. - - YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, -used together with the 'source-node' value for this -link. - """ - 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=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """tunnel_name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__tunnel_name = t - if hasattr(self, '_set'): - self._set() - - def _unset_tunnel_name(self): - self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_sharing(self): - """ - Getter method for sharing, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/sharing (boolean) - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - return self.__sharing - - def _set_sharing(self, v, load=False): - """ - Setter method for sharing, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/sharing (boolean) - If this variable is read-only (config: false) in the - source YANG file, then _set_sharing is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_sharing() directly. - - YANG Description: 'true' if the underlay tunnel can be shared with other -TE links; -'false' if the underlay tunnel is dedicated to this -TE link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """sharing must be of a type compatible with boolean""", - 'defined-type': "boolean", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", - }) - - self.__sharing = t - if hasattr(self, '_set'): - self._set() - - def _unset_sharing(self): - self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) - - tunnel_name = __builtin__.property(_get_tunnel_name, _set_tunnel_name) - sharing = __builtin__.property(_get_sharing, _set_sharing) - - - _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py deleted file mode 100644 index 47c06f99e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_bandwidth -class unreserved_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/unreserved-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in -bytes per second. - """ - __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) - - _yang_name = 'unreserved-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'unreserved-bandwidth'] - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/priority (uint8) - - YANG Description: Priority. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/priority (uint8) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: Priority. - """ - 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=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint8""", - 'defined-type': "uint8", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) - - - def _get_te_bandwidth(self): - """ - Getter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth (container) - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - return self.__te_bandwidth - - def _set_te_bandwidth(self, v, load=False): - """ - Setter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_bandwidth() directly. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_bandwidth must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_bandwidth(self): - self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - priority = __builtin__.property(_get_priority, _set_priority) - te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) - - - _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py deleted file mode 100644 index 35527bd35..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import otn -class te_bandwidth(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/unreserved-bandwidth/te-bandwidth. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Container that specifies TE bandwidth. The choices -can be augmented for specific data-plane technologies. - """ - __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) - - _yang_name = 'te-bandwidth' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'unreserved-bandwidth', 'te-bandwidth'] - - def _get_generic(self): - """ - Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/generic (te-bandwidth) - - YANG Description: Bandwidth specified in a generic format. - """ - return self.__generic - - def _set_generic(self, v, load=False): - """ - Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/generic (te-bandwidth) - If this variable is read-only (config: false) in the - source YANG file, then _set_generic is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_generic() directly. - - YANG Description: Bandwidth specified in a generic format. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """generic must be of a type compatible with te-bandwidth""", - 'defined-type': "ietf-te-topology:te-bandwidth", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", - }) - - self.__generic = t - if hasattr(self, '_set'): - self._set() - - def _unset_generic(self): - self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) - - - def _get_otn(self): - """ - Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn (container) - - YANG Description: Bandwidth attributes for OTN links - """ - return self.__otn - - def _set_otn(self, v, load=False): - """ - Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_otn is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_otn() directly. - - YANG Description: Bandwidth attributes for OTN links - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """otn must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", - }) - - self.__otn = t - if hasattr(self, '_set'): - self._set() - - def _unset_otn(self): - self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) - - - def _get_eth_bandwidth(self): - """ - Getter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/eth_bandwidth (uint64) - - YANG Description: Available bandwith value expressed in kilobits per second - """ - return self.__eth_bandwidth - - def _set_eth_bandwidth(self, v, load=False): - """ - Setter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/eth_bandwidth (uint64) - If this variable is read-only (config: false) in the - source YANG file, then _set_eth_bandwidth is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_eth_bandwidth() directly. - - YANG Description: Available bandwith value expressed in kilobits per second - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """eth_bandwidth must be of a type compatible with uint64""", - 'defined-type': "uint64", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", - }) - - self.__eth_bandwidth = t - if hasattr(self, '_set'): - self._set() - - def _unset_eth_bandwidth(self): - self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) - - generic = __builtin__.property(_get_generic, _set_generic) - otn = __builtin__.property(_get_otn, _set_otn) - eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) - - __choices__ = {'technology': {'generic': ['generic']}} - _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py deleted file mode 100644 index 9f57b381b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import odulist -class otn(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/unreserved-bandwidth/te-bandwidth/otn. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Bandwidth attributes for OTN links - """ - __slots__ = ('_path_helper', '_extmethods', '__odulist',) - - _yang_name = 'otn' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'unreserved-bandwidth', 'te-bandwidth', 'otn'] - - def _get_odulist(self): - """ - Getter method for odulist, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist (list) - - YANG Description: OTN bandwidth definition - """ - return self.__odulist - - def _set_odulist(self, v, load=False): - """ - Setter method for odulist, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist (list) - If this variable is read-only (config: false) in the - source YANG file, then _set_odulist is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odulist() directly. - - YANG Description: OTN bandwidth definition - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odulist must be of a type compatible with list""", - 'defined-type': "list", - 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", - }) - - self.__odulist = t - if hasattr(self, '_set'): - self._set() - - def _unset_odulist(self): - self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) - - odulist = __builtin__.property(_get_odulist, _set_odulist) - - - _pyangbind_elements = OrderedDict([('odulist', odulist), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py deleted file mode 100644 index 67eca2bd3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class odulist(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/unreserved-bandwidth/te-bandwidth/otn/odulist. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: OTN bandwidth definition - """ - __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) - - _yang_name = 'odulist' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', 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 ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'unreserved-bandwidth', 'te-bandwidth', 'otn', 'odulist'] - - def _get_odu_type(self): - """ - Getter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - - YANG Description: ODU type - """ - return self.__odu_type - - def _set_odu_type(self, v, load=False): - """ - Setter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) - If this variable is read-only (config: false) in the - source YANG file, then _set_odu_type is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_odu_type() directly. - - YANG Description: ODU type - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """odu_type must be of a type compatible with identityref""", - 'defined-type': "ietf-otn-topology:identityref", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", - }) - - self.__odu_type = t - if hasattr(self, '_set'): - self._set() - - def _unset_odu_type(self): - self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) - - - def _get_number(self): - """ - Getter method for number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/number (uint16) - - YANG Description: Number of ODUs - """ - return self.__number - - def _set_number(self, v, load=False): - """ - Setter method for number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_number() directly. - - YANG Description: Number of ODUs - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__number = t - if hasattr(self, '_set'): - self._set() - - def _unset_number(self): - self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - - def _get_ts_number(self): - """ - Getter method for ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - return self.__ts_number - - def _set_ts_number(self, v, load=False): - """ - Setter method for ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_ts_number is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_ts_number() directly. - - YANG Description: The number of Tributary Slots (TS) that -could be used by all the ODUflex LSPs. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """ts_number must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", - }) - - self.__ts_number = t - if hasattr(self, '_set'): - self._set() - - def _unset_ts_number(self): - self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) - - odu_type = __builtin__.property(_get_odu_type, _set_odu_type) - number = __builtin__.property(_get_number, _set_number) - ts_number = __builtin__.property(_get_ts_number, _set_ts_number) - - - _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/node_template/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/node_template/__init__.py deleted file mode 100644 index f7a053a34..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/node_template/__init__.py +++ /dev/null @@ -1,251 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import te_node_attributes -class node_template(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/node-template. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: The list of TE node templates used to define sharable -and reusable TE node attributes. - """ - __slots__ = ('_path_helper', '_extmethods', '__name','__priority','__reference_change_policy','__te_node_attributes',) - - _yang_name = 'node-template' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True) - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) - self.__reference_change_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - self.__te_node_attributes = YANGDynClass(base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'node-template'] - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/te/templates/node_template/name (te-types:te-template-name) - - YANG Description: The name to identify a TE node template. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/te/templates/node_template/name (te-types:te-template-name) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: The name to identify a TE node template. - """ - 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=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with te-types:te-template-name""", - 'defined-type': "te-types:te-template-name", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True) - - - def _get_priority(self): - """ - Getter method for priority, mapped from YANG variable /networks/te/templates/node_template/priority (uint16) - - YANG Description: The preference value for resolving conflicts between -different templates. When two or more templates specify -values for one configuration attribute, the value from the -template with the highest priority is used. -A lower number indicates a higher priority. The highest -priority is 0. - """ - return self.__priority - - def _set_priority(self, v, load=False): - """ - Setter method for priority, mapped from YANG variable /networks/te/templates/node_template/priority (uint16) - If this variable is read-only (config: false) in the - source YANG file, then _set_priority is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_priority() directly. - - YANG Description: The preference value for resolving conflicts between -different templates. When two or more templates specify -values for one configuration attribute, the value from the -template with the highest priority is used. -A lower number indicates a higher priority. The highest -priority is 0. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """priority must be of a type compatible with uint16""", - 'defined-type': "uint16", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True)""", - }) - - self.__priority = t - if hasattr(self, '_set'): - self._set() - - def _unset_priority(self): - self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) - - - def _get_reference_change_policy(self): - """ - Getter method for reference_change_policy, mapped from YANG variable /networks/te/templates/node_template/reference_change_policy (enumeration) - - YANG Description: This attribute specifies the action taken for a -configuration node that has a reference to this template. - """ - return self.__reference_change_policy - - def _set_reference_change_policy(self, v, load=False): - """ - Setter method for reference_change_policy, mapped from YANG variable /networks/te/templates/node_template/reference_change_policy (enumeration) - If this variable is read-only (config: false) in the - source YANG file, then _set_reference_change_policy is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_reference_change_policy() directly. - - YANG Description: This attribute specifies the action taken for a -configuration node that has a reference to this template. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """reference_change_policy must be of a type compatible with enumeration""", - 'defined-type': "ietf-te-topology:enumeration", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", - }) - - self.__reference_change_policy = t - if hasattr(self, '_set'): - self._set() - - def _unset_reference_change_policy(self): - self.__reference_change_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) - - - def _get_te_node_attributes(self): - """ - Getter method for te_node_attributes, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes (container) - - YANG Description: Contains node attributes in a TE topology. - """ - return self.__te_node_attributes - - def _set_te_node_attributes(self, v, load=False): - """ - Setter method for te_node_attributes, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_te_node_attributes is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_te_node_attributes() directly. - - YANG Description: Contains node attributes in a TE topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """te_node_attributes must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__te_node_attributes = t - if hasattr(self, '_set'): - self._set() - - def _unset_te_node_attributes(self): - self.__te_node_attributes = YANGDynClass(base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - name = __builtin__.property(_get_name, _set_name) - priority = __builtin__.property(_get_priority, _set_priority) - reference_change_policy = __builtin__.property(_get_reference_change_policy, _set_reference_change_policy) - te_node_attributes = __builtin__.property(_get_te_node_attributes, _set_te_node_attributes) - - - _pyangbind_elements = OrderedDict([('name', name), ('priority', priority), ('reference_change_policy', reference_change_policy), ('te_node_attributes', te_node_attributes), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py deleted file mode 100644 index 32a98a2da..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py +++ /dev/null @@ -1,317 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -from . import underlay_topology -class te_node_attributes(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/node-template/te-node-attributes. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: Contains node attributes in a TE topology. - """ - __slots__ = ('_path_helper', '_extmethods', '__admin_status','__domain_id','__is_abstract','__name','__signaling_address','__underlay_topology',) - - _yang_name = 'te-node-attributes' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - self.__domain_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - self.__signaling_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True) - self.__underlay_topology = YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', 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 ['networks', 'te', 'templates', 'node-template', 'te-node-attributes'] - - def _get_admin_status(self): - """ - Getter method for admin_status, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/admin_status (te-types:te-admin-status) - - YANG Description: The administrative state of the link. - """ - return self.__admin_status - - def _set_admin_status(self, v, load=False): - """ - Setter method for admin_status, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/admin_status (te-types:te-admin-status) - If this variable is read-only (config: false) in the - source YANG file, then _set_admin_status is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_admin_status() directly. - - YANG Description: The administrative state of the link. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """admin_status must be of a type compatible with te-types:te-admin-status""", - 'defined-type': "te-types:te-admin-status", - 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True)""", - }) - - self.__admin_status = t - if hasattr(self, '_set'): - self._set() - - def _unset_admin_status(self): - self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) - - - def _get_domain_id(self): - """ - Getter method for domain_id, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/domain_id (uint32) - - YANG Description: Identifies the domain to which this node belongs. -This attribute is used to support inter-domain links. - """ - return self.__domain_id - - def _set_domain_id(self, v, load=False): - """ - Setter method for domain_id, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/domain_id (uint32) - If this variable is read-only (config: false) in the - source YANG file, then _set_domain_id is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_domain_id() directly. - - YANG Description: Identifies the domain to which this node belongs. -This attribute is used to support inter-domain links. - """ - 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="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """domain_id 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="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", - }) - - self.__domain_id = t - if hasattr(self, '_set'): - self._set() - - def _unset_domain_id(self): - self.__domain_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) - - - def _get_is_abstract(self): - """ - Getter method for is_abstract, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/is_abstract (empty) - - YANG Description: Present if the node is abstract; not present if the node -is actual. - """ - return self.__is_abstract - - def _set_is_abstract(self, v, load=False): - """ - Setter method for is_abstract, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/is_abstract (empty) - If this variable is read-only (config: false) in the - source YANG file, then _set_is_abstract is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_is_abstract() directly. - - YANG Description: Present if the node is abstract; not present if the node -is actual. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """is_abstract must be of a type compatible with empty""", - 'defined-type': "empty", - 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True)""", - }) - - self.__is_abstract = t - if hasattr(self, '_set'): - self._set() - - def _unset_is_abstract(self): - self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) - - - def _get_name(self): - """ - Getter method for name, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/name (string) - - YANG Description: Node name. - """ - return self.__name - - def _set_name(self, v, load=False): - """ - Setter method for name, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/name (string) - If this variable is read-only (config: false) in the - source YANG file, then _set_name is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_name() directly. - - YANG Description: Node name. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """name must be of a type compatible with string""", - 'defined-type': "string", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", - }) - - self.__name = t - if hasattr(self, '_set'): - self._set() - - def _unset_name(self): - self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) - - - def _get_signaling_address(self): - """ - Getter method for signaling_address, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/signaling_address (inet:ip-address) - - YANG Description: The node's signaling address. - """ - return self.__signaling_address - - def _set_signaling_address(self, v, load=False): - """ - Setter method for signaling_address, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/signaling_address (inet:ip-address) - If this variable is read-only (config: false) in the - source YANG file, then _set_signaling_address is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_signaling_address() directly. - - YANG Description: The node's signaling address. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """signaling_address must be of a type compatible with inet:ip-address""", - 'defined-type': "inet:ip-address", - 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True)""", - }) - - self.__signaling_address = t - if hasattr(self, '_set'): - self._set() - - def _unset_signaling_address(self): - self.__signaling_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([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])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True) - - - def _get_underlay_topology(self): - """ - Getter method for underlay_topology, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/underlay_topology (container) - - YANG Description: When an abstract node encapsulates a topology, the -attributes in this container point to said topology. - """ - return self.__underlay_topology - - def _set_underlay_topology(self, v, load=False): - """ - Setter method for underlay_topology, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/underlay_topology (container) - If this variable is read-only (config: false) in the - source YANG file, then _set_underlay_topology is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_underlay_topology() directly. - - YANG Description: When an abstract node encapsulates a topology, the -attributes in this container point to said topology. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """underlay_topology must be of a type compatible with container""", - 'defined-type': "container", - 'generated-type': """YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", - }) - - self.__underlay_topology = t - if hasattr(self, '_set'): - self._set() - - def _unset_underlay_topology(self): - self.__underlay_topology = YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) - - admin_status = __builtin__.property(_get_admin_status, _set_admin_status) - domain_id = __builtin__.property(_get_domain_id, _set_domain_id) - is_abstract = __builtin__.property(_get_is_abstract, _set_is_abstract) - name = __builtin__.property(_get_name, _set_name) - signaling_address = __builtin__.property(_get_signaling_address, _set_signaling_address) - underlay_topology = __builtin__.property(_get_underlay_topology, _set_underlay_topology) - - - _pyangbind_elements = OrderedDict([('admin_status', admin_status), ('domain_id', domain_id), ('is_abstract', is_abstract), ('name', name), ('signaling_address', signaling_address), ('underlay_topology', underlay_topology), ]) - - diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py deleted file mode 100644 index 9480263d4..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_sap_topology/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -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.yangtypes import YANGBinary -from pyangbind.lib.yangtypes import YANGBitsType -from pyangbind.lib.base import PybindBase -from collections import OrderedDict -from decimal import Decimal -import six - -# PY3 support of some PY2 keywords (needs improved) -if six.PY3: - import builtins as __builtin__ - long = int -elif six.PY2: - import __builtin__ - -class underlay_topology(PybindBase): - """ - This class was auto-generated by the PythonClass plugin for PYANG - from YANG module ietf-network - based on the path /networks/te/templates/node-template/te-node-attributes/underlay-topology. Each member element of - the container is represented as a class variable - with a specific - YANG type. - - YANG Description: When an abstract node encapsulates a topology, the -attributes in this container point to said topology. - """ - __slots__ = ('_path_helper', '_extmethods', '__network_ref',) - - _yang_name = 'underlay-topology' - _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' - - _pybind_generated_by = 'container' - - def __init__(self, *args, **kwargs): - - self._path_helper = False - - self._extmethods = False - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', 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 ['networks', 'te', 'templates', 'node-template', 'te-node-attributes', 'underlay-topology'] - - def _get_network_ref(self): - """ - Getter method for network_ref, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/underlay_topology/network_ref (leafref) - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - return self.__network_ref - - def _set_network_ref(self, v, load=False): - """ - Setter method for network_ref, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/underlay_topology/network_ref (leafref) - If this variable is read-only (config: false) in the - source YANG file, then _set_network_ref is considered as a private - method. Backends looking to populate this variable should - do so via calling thisObj._set_network_ref() directly. - - YANG Description: Used to reference a network -- for example, an underlay -network. - """ - if hasattr(v, "_utype"): - v = v._utype(v) - try: - t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - except (TypeError, ValueError): - raise ValueError({ - 'error-string': """network_ref must be of a type compatible with leafref""", - 'defined-type': "leafref", - 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", - }) - - self.__network_ref = t - if hasattr(self, '_set'): - self._set() - - def _unset_network_ref(self): - self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) - - network_ref = __builtin__.property(_get_network_ref, _set_network_ref) - - - _pyangbind_elements = OrderedDict([('network_ref', network_ref), ]) - - diff --git a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java b/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java index 2a0b2683b..cfce9dad0 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java @@ -200,9 +200,17 @@ public final class ContextOuterClass { */ DEVICEDRIVER_QKD(12), /** - * DEVICEDRIVER_PON = 13; + * DEVICEDRIVER_IETF_L3VPN = 13; */ - DEVICEDRIVER_PON(13), + DEVICEDRIVER_IETF_L3VPN(13), + /** + * DEVICEDRIVER_IETF_SLICE = 14; + */ + DEVICEDRIVER_IETF_SLICE(14), + /** + * DEVICEDRIVER_NCE = 15; + */ + DEVICEDRIVER_NCE(15), UNRECOGNIZED(-1); /** @@ -275,9 +283,19 @@ public final class ContextOuterClass { public static final int DEVICEDRIVER_QKD_VALUE = 12; /** - * DEVICEDRIVER_PON = 13; + * DEVICEDRIVER_IETF_L3VPN = 13; + */ + public static final int DEVICEDRIVER_IETF_L3VPN_VALUE = 13; + + /** + * DEVICEDRIVER_IETF_SLICE = 14; + */ + public static final int DEVICEDRIVER_IETF_SLICE_VALUE = 14; + + /** + * DEVICEDRIVER_NCE = 15; */ - public static final int DEVICEDRIVER_PON_VALUE = 13; + public static final int DEVICEDRIVER_NCE_VALUE = 15; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -329,7 +347,11 @@ public final class ContextOuterClass { case 12: return DEVICEDRIVER_QKD; case 13: - return DEVICEDRIVER_PON; + return DEVICEDRIVER_IETF_L3VPN; + case 14: + return DEVICEDRIVER_IETF_SLICE; + case 15: + return DEVICEDRIVER_NCE; default: return null; } @@ -507,17 +529,17 @@ public final class ContextOuterClass { */ LINKTYPE_COPPER(1), /** - * LINKTYPE_VIRTUAL_COPPER = 2; + * LINKTYPE_FIBER = 2; */ - LINKTYPE_VIRTUAL_COPPER(2), + LINKTYPE_FIBER(2), /** - * LINKTYPE_OPTICAL = 3; + * LINKTYPE_RADIO = 3; */ - LINKTYPE_OPTICAL(3), + LINKTYPE_RADIO(3), /** - * LINKTYPE_VIRTUAL_OPTICAL = 4; + * LINKTYPE_VIRTUAL = 4; */ - LINKTYPE_VIRTUAL_OPTICAL(4), + LINKTYPE_VIRTUAL(4), UNRECOGNIZED(-1); /** @@ -531,19 +553,19 @@ public final class ContextOuterClass { public static final int LINKTYPE_COPPER_VALUE = 1; /** - * LINKTYPE_VIRTUAL_COPPER = 2; + * LINKTYPE_FIBER = 2; */ - public static final int LINKTYPE_VIRTUAL_COPPER_VALUE = 2; + public static final int LINKTYPE_FIBER_VALUE = 2; /** - * LINKTYPE_OPTICAL = 3; + * LINKTYPE_RADIO = 3; */ - public static final int LINKTYPE_OPTICAL_VALUE = 3; + public static final int LINKTYPE_RADIO_VALUE = 3; /** - * LINKTYPE_VIRTUAL_OPTICAL = 4; + * LINKTYPE_VIRTUAL = 4; */ - public static final int LINKTYPE_VIRTUAL_OPTICAL_VALUE = 4; + public static final int LINKTYPE_VIRTUAL_VALUE = 4; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -573,11 +595,11 @@ public final class ContextOuterClass { case 1: return LINKTYPE_COPPER; case 2: - return LINKTYPE_VIRTUAL_COPPER; + return LINKTYPE_FIBER; case 3: - return LINKTYPE_OPTICAL; + return LINKTYPE_RADIO; case 4: - return LINKTYPE_VIRTUAL_OPTICAL; + return LINKTYPE_VIRTUAL; default: return null; } @@ -24099,58 +24121,58 @@ public final class ContextOuterClass { com.google.protobuf.ByteString getNameBytes(); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * .context.LinkTypeEnum link_type = 3; + * @return The enum numeric value on the wire for linkType. + */ + int getLinkTypeValue(); + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The linkType. + */ + context.ContextOuterClass.LinkTypeEnum getLinkType(); + + /** + * repeated .context.EndPointId link_endpoint_ids = 4; */ java.util.List getLinkEndpointIdsList(); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ context.ContextOuterClass.EndPointId getLinkEndpointIds(int index); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ int getLinkEndpointIdsCount(); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ java.util.List getLinkEndpointIdsOrBuilderList(); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index); /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return Whether the attributes field is set. */ boolean hasAttributes(); /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return The attributes. */ context.ContextOuterClass.LinkAttributes getAttributes(); /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder(); - - /** - * .context.LinkTypeEnum link_type = 5; - * @return The enum numeric value on the wire for linkType. - */ - int getLinkTypeValue(); - - /** - * .context.LinkTypeEnum link_type = 5; - * @return The linkType. - */ - context.ContextOuterClass.LinkTypeEnum getLinkType(); } /** @@ -24168,8 +24190,8 @@ public final class ContextOuterClass { private Link() { name_ = ""; - linkEndpointIds_ = java.util.Collections.emptyList(); linkType_ = 0; + linkEndpointIds_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -24255,13 +24277,36 @@ public final class ContextOuterClass { } } - public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 3; + public static final int LINK_TYPE_FIELD_NUMBER = 3; + + private int linkType_ = 0; + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The enum numeric value on the wire for linkType. + */ + @java.lang.Override + public int getLinkTypeValue() { + return linkType_; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The linkType. + */ + @java.lang.Override + public context.ContextOuterClass.LinkTypeEnum getLinkType() { + context.ContextOuterClass.LinkTypeEnum result = context.ContextOuterClass.LinkTypeEnum.forNumber(linkType_); + return result == null ? context.ContextOuterClass.LinkTypeEnum.UNRECOGNIZED : result; + } + + public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 4; @SuppressWarnings("serial") private java.util.List linkEndpointIds_; /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public java.util.List getLinkEndpointIdsList() { @@ -24269,7 +24314,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public java.util.List getLinkEndpointIdsOrBuilderList() { @@ -24277,7 +24322,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public int getLinkEndpointIdsCount() { @@ -24285,7 +24330,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { @@ -24293,19 +24338,19 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { return linkEndpointIds_.get(index); } - public static final int ATTRIBUTES_FIELD_NUMBER = 4; + public static final int ATTRIBUTES_FIELD_NUMBER = 5; private context.ContextOuterClass.LinkAttributes attributes_; /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return Whether the attributes field is set. */ @java.lang.Override @@ -24314,7 +24359,7 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return The attributes. */ @java.lang.Override @@ -24323,36 +24368,13 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ @java.lang.Override public context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder() { return attributes_ == null ? context.ContextOuterClass.LinkAttributes.getDefaultInstance() : attributes_; } - public static final int LINK_TYPE_FIELD_NUMBER = 5; - - private int linkType_ = 0; - - /** - * .context.LinkTypeEnum link_type = 5; - * @return The enum numeric value on the wire for linkType. - */ - @java.lang.Override - public int getLinkTypeValue() { - return linkType_; - } - - /** - * .context.LinkTypeEnum link_type = 5; - * @return The linkType. - */ - @java.lang.Override - public context.ContextOuterClass.LinkTypeEnum getLinkType() { - context.ContextOuterClass.LinkTypeEnum result = context.ContextOuterClass.LinkTypeEnum.forNumber(linkType_); - return result == null ? context.ContextOuterClass.LinkTypeEnum.UNRECOGNIZED : result; - } - private byte memoizedIsInitialized = -1; @java.lang.Override @@ -24374,14 +24396,14 @@ public final class ContextOuterClass { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } + if (linkType_ != context.ContextOuterClass.LinkTypeEnum.LINKTYPE_UNKNOWN.getNumber()) { + output.writeEnum(3, linkType_); + } for (int i = 0; i < linkEndpointIds_.size(); i++) { - output.writeMessage(3, linkEndpointIds_.get(i)); + output.writeMessage(4, linkEndpointIds_.get(i)); } if (attributes_ != null) { - output.writeMessage(4, getAttributes()); - } - if (linkType_ != context.ContextOuterClass.LinkTypeEnum.LINKTYPE_UNKNOWN.getNumber()) { - output.writeEnum(5, linkType_); + output.writeMessage(5, getAttributes()); } getUnknownFields().writeTo(output); } @@ -24398,14 +24420,14 @@ public final class ContextOuterClass { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } + if (linkType_ != context.ContextOuterClass.LinkTypeEnum.LINKTYPE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, linkType_); + } for (int i = 0; i < linkEndpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, linkEndpointIds_.get(i)); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkEndpointIds_.get(i)); } if (attributes_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAttributes()); - } - if (linkType_ != context.ContextOuterClass.LinkTypeEnum.LINKTYPE_UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, linkType_); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAttributes()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -24429,6 +24451,8 @@ public final class ContextOuterClass { } if (!getName().equals(other.getName())) return false; + if (linkType_ != other.linkType_) + return false; if (!getLinkEndpointIdsList().equals(other.getLinkEndpointIdsList())) return false; if (hasAttributes() != other.hasAttributes()) @@ -24437,8 +24461,6 @@ public final class ContextOuterClass { if (!getAttributes().equals(other.getAttributes())) return false; } - if (linkType_ != other.linkType_) - return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -24457,6 +24479,8 @@ public final class ContextOuterClass { } hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LINK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + linkType_; if (getLinkEndpointIdsCount() > 0) { hash = (37 * hash) + LINK_ENDPOINT_IDS_FIELD_NUMBER; hash = (53 * hash) + getLinkEndpointIdsList().hashCode(); @@ -24465,8 +24489,6 @@ public final class ContextOuterClass { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + getAttributes().hashCode(); } - hash = (37 * hash) + LINK_TYPE_FIELD_NUMBER; - hash = (53 * hash) + linkType_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -24577,19 +24599,19 @@ public final class ContextOuterClass { linkIdBuilder_ = null; } name_ = ""; + linkType_ = 0; if (linkEndpointIdsBuilder_ == null) { linkEndpointIds_ = java.util.Collections.emptyList(); } else { linkEndpointIds_ = null; linkEndpointIdsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); attributes_ = null; if (attributesBuilder_ != null) { attributesBuilder_.dispose(); attributesBuilder_ = null; } - linkType_ = 0; return this; } @@ -24625,9 +24647,9 @@ public final class ContextOuterClass { private void buildPartialRepeatedFields(context.ContextOuterClass.Link result) { if (linkEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { linkEndpointIds_ = java.util.Collections.unmodifiableList(linkEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } result.linkEndpointIds_ = linkEndpointIds_; } else { @@ -24643,11 +24665,11 @@ public final class ContextOuterClass { if (((from_bitField0_ & 0x00000002) != 0)) { result.name_ = name_; } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.attributes_ = attributesBuilder_ == null ? attributes_ : attributesBuilder_.build(); + if (((from_bitField0_ & 0x00000004) != 0)) { + result.linkType_ = linkType_; } if (((from_bitField0_ & 0x00000010) != 0)) { - result.linkType_ = linkType_; + result.attributes_ = attributesBuilder_ == null ? attributes_ : attributesBuilder_.build(); } } @@ -24672,11 +24694,14 @@ public final class ContextOuterClass { bitField0_ |= 0x00000002; onChanged(); } + if (other.linkType_ != 0) { + setLinkTypeValue(other.getLinkTypeValue()); + } if (linkEndpointIdsBuilder_ == null) { if (!other.linkEndpointIds_.isEmpty()) { if (linkEndpointIds_.isEmpty()) { linkEndpointIds_ = other.linkEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureLinkEndpointIdsIsMutable(); linkEndpointIds_.addAll(other.linkEndpointIds_); @@ -24689,7 +24714,7 @@ public final class ContextOuterClass { linkEndpointIdsBuilder_.dispose(); linkEndpointIdsBuilder_ = null; linkEndpointIds_ = other.linkEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); linkEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkEndpointIdsFieldBuilder() : null; } else { linkEndpointIdsBuilder_.addAllMessages(other.linkEndpointIds_); @@ -24699,9 +24724,6 @@ public final class ContextOuterClass { if (other.hasAttributes()) { mergeAttributes(other.getAttributes()); } - if (other.linkType_ != 0) { - setLinkTypeValue(other.getLinkTypeValue()); - } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -24739,7 +24761,14 @@ public final class ContextOuterClass { break; } // case 18 - case 26: + case 24: + { + linkType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + case 34: { context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); if (linkEndpointIdsBuilder_ == null) { @@ -24750,21 +24779,14 @@ public final class ContextOuterClass { } break; } - // case 26 - case 34: - { - input.readMessage(getAttributesFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: + case 42: { - linkType_ = input.readEnum(); + input.readMessage(getAttributesFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } - // case 40 + // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -24981,19 +25003,78 @@ public final class ContextOuterClass { return this; } + private int linkType_ = 0; + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The enum numeric value on the wire for linkType. + */ + @java.lang.Override + public int getLinkTypeValue() { + return linkType_; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @param value The enum numeric value on the wire for linkType to set. + * @return This builder for chaining. + */ + public Builder setLinkTypeValue(int value) { + linkType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The linkType. + */ + @java.lang.Override + public context.ContextOuterClass.LinkTypeEnum getLinkType() { + context.ContextOuterClass.LinkTypeEnum result = context.ContextOuterClass.LinkTypeEnum.forNumber(linkType_); + return result == null ? context.ContextOuterClass.LinkTypeEnum.UNRECOGNIZED : result; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @param value The linkType to set. + * @return This builder for chaining. + */ + public Builder setLinkType(context.ContextOuterClass.LinkTypeEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + linkType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @return This builder for chaining. + */ + public Builder clearLinkType() { + bitField0_ = (bitField0_ & ~0x00000004); + linkType_ = 0; + onChanged(); + return this; + } + private java.util.List linkEndpointIds_ = java.util.Collections.emptyList(); private void ensureLinkEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { linkEndpointIds_ = new java.util.ArrayList(linkEndpointIds_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3 linkEndpointIdsBuilder_; /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public java.util.List getLinkEndpointIdsList() { if (linkEndpointIdsBuilder_ == null) { @@ -25004,7 +25085,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public int getLinkEndpointIdsCount() { if (linkEndpointIdsBuilder_ == null) { @@ -25015,7 +25096,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { if (linkEndpointIdsBuilder_ == null) { @@ -25026,7 +25107,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { if (linkEndpointIdsBuilder_ == null) { @@ -25043,7 +25124,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { if (linkEndpointIdsBuilder_ == null) { @@ -25057,7 +25138,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId value) { if (linkEndpointIdsBuilder_ == null) { @@ -25074,7 +25155,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { if (linkEndpointIdsBuilder_ == null) { @@ -25091,7 +25172,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { if (linkEndpointIdsBuilder_ == null) { @@ -25105,7 +25186,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { if (linkEndpointIdsBuilder_ == null) { @@ -25119,7 +25200,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addAllLinkEndpointIds(java.lang.Iterable values) { if (linkEndpointIdsBuilder_ == null) { @@ -25133,12 +25214,12 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder clearLinkEndpointIds() { if (linkEndpointIdsBuilder_ == null) { linkEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { linkEndpointIdsBuilder_.clear(); @@ -25147,7 +25228,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder removeLinkEndpointIds(int index) { if (linkEndpointIdsBuilder_ == null) { @@ -25161,14 +25242,14 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointId.Builder getLinkEndpointIdsBuilder(int index) { return getLinkEndpointIdsFieldBuilder().getBuilder(index); } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { if (linkEndpointIdsBuilder_ == null) { @@ -25179,7 +25260,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public java.util.List getLinkEndpointIdsOrBuilderList() { if (linkEndpointIdsBuilder_ != null) { @@ -25190,21 +25271,21 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder() { return getLinkEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder(int index) { return getLinkEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public java.util.List getLinkEndpointIdsBuilderList() { return getLinkEndpointIdsFieldBuilder().getBuilderList(); @@ -25212,7 +25293,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3 getLinkEndpointIdsFieldBuilder() { if (linkEndpointIdsBuilder_ == null) { - linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkEndpointIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkEndpointIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); linkEndpointIds_ = null; } return linkEndpointIdsBuilder_; @@ -25223,15 +25304,15 @@ public final class ContextOuterClass { private com.google.protobuf.SingleFieldBuilderV3 attributesBuilder_; /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return Whether the attributes field is set. */ public boolean hasAttributes() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return The attributes. */ public context.ContextOuterClass.LinkAttributes getAttributes() { @@ -25243,7 +25324,7 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public Builder setAttributes(context.ContextOuterClass.LinkAttributes value) { if (attributesBuilder_ == null) { @@ -25254,13 +25335,13 @@ public final class ContextOuterClass { } else { attributesBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public Builder setAttributes(context.ContextOuterClass.LinkAttributes.Builder builderForValue) { if (attributesBuilder_ == null) { @@ -25268,17 +25349,17 @@ public final class ContextOuterClass { } else { attributesBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public Builder mergeAttributes(context.ContextOuterClass.LinkAttributes value) { if (attributesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && attributes_ != null && attributes_ != context.ContextOuterClass.LinkAttributes.getDefaultInstance()) { + if (((bitField0_ & 0x00000010) != 0) && attributes_ != null && attributes_ != context.ContextOuterClass.LinkAttributes.getDefaultInstance()) { getAttributesBuilder().mergeFrom(value); } else { attributes_ = value; @@ -25286,16 +25367,16 @@ public final class ContextOuterClass { } else { attributesBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public Builder clearAttributes() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); attributes_ = null; if (attributesBuilder_ != null) { attributesBuilder_.dispose(); @@ -25306,16 +25387,16 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public context.ContextOuterClass.LinkAttributes.Builder getAttributesBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getAttributesFieldBuilder().getBuilder(); } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder() { if (attributesBuilder_ != null) { @@ -25326,7 +25407,7 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ private com.google.protobuf.SingleFieldBuilderV3 getAttributesFieldBuilder() { if (attributesBuilder_ == null) { @@ -25336,65 +25417,6 @@ public final class ContextOuterClass { return attributesBuilder_; } - private int linkType_ = 0; - - /** - * .context.LinkTypeEnum link_type = 5; - * @return The enum numeric value on the wire for linkType. - */ - @java.lang.Override - public int getLinkTypeValue() { - return linkType_; - } - - /** - * .context.LinkTypeEnum link_type = 5; - * @param value The enum numeric value on the wire for linkType to set. - * @return This builder for chaining. - */ - public Builder setLinkTypeValue(int value) { - linkType_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * .context.LinkTypeEnum link_type = 5; - * @return The linkType. - */ - @java.lang.Override - public context.ContextOuterClass.LinkTypeEnum getLinkType() { - context.ContextOuterClass.LinkTypeEnum result = context.ContextOuterClass.LinkTypeEnum.forNumber(linkType_); - return result == null ? context.ContextOuterClass.LinkTypeEnum.UNRECOGNIZED : result; - } - - /** - * .context.LinkTypeEnum link_type = 5; - * @param value The linkType to set. - * @return This builder for chaining. - */ - public Builder setLinkType(context.ContextOuterClass.LinkTypeEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - linkType_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * .context.LinkTypeEnum link_type = 5; - * @return This builder for chaining. - */ - public Builder clearLinkType() { - bitField0_ = (bitField0_ & ~0x00000010); - linkType_ = 0; - onChanged(); - return this; - } - @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -80803,7 +80825,7 @@ public final class ContextOuterClass { private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { "\n\rcontext.proto\022\007context\032\tacl.proto\032\026kpi" + "_sample_types.proto\"\007\n\005Empty\"\024\n\004Uuid\022\014\n\004" + "uuid\030\001 \001(\t\"\036\n\tTimestamp\022\021\n\ttimestamp\030\001 \001" + "(\001\"Z\n\005Event\022%\n\ttimestamp\030\001 \001(\0132\022.context" + ".Timestamp\022*\n\nevent_type\030\002 \001(\0162\026.context" + ".EventTypeEnum\"0\n\tContextId\022#\n\014context_u" + "uid\030\001 \001(\0132\r.context.Uuid\"\351\001\n\007Context\022&\n\n" + "context_id\030\001 \001(\0132\022.context.ContextId\022\014\n\004" + "name\030\002 \001(\t\022)\n\014topology_ids\030\003 \003(\0132\023.conte" + "xt.TopologyId\022\'\n\013service_ids\030\004 \003(\0132\022.con" + "text.ServiceId\022#\n\tslice_ids\030\005 \003(\0132\020.cont" + "ext.SliceId\022/\n\ncontroller\030\006 \001(\0132\033.contex" + "t.TeraFlowController\"8\n\rContextIdList\022\'\n" + "\013context_ids\030\001 \003(\0132\022.context.ContextId\"1" + "\n\013ContextList\022\"\n\010contexts\030\001 \003(\0132\020.contex" + "t.Context\"U\n\014ContextEvent\022\035\n\005event\030\001 \001(\013" + "2\016.context.Event\022&\n\ncontext_id\030\002 \001(\0132\022.c" + "ontext.ContextId\"Z\n\nTopologyId\022&\n\ncontex" + "t_id\030\001 \001(\0132\022.context.ContextId\022$\n\rtopolo" + "gy_uuid\030\002 \001(\0132\r.context.Uuid\"\267\001\n\010Topolog" + "y\022(\n\013topology_id\030\001 \001(\0132\023.context.Topolog" + "yId\022\014\n\004name\030\002 \001(\t\022%\n\ndevice_ids\030\003 \003(\0132\021." + "context.DeviceId\022!\n\010link_ids\030\004 \003(\0132\017.con" + "text.LinkId\022)\n\020optical_link_ids\030\005 \003(\0132\017." + "context.LinkId\"\266\001\n\017TopologyDetails\022(\n\013to" + "pology_id\030\001 \001(\0132\023.context.TopologyId\022\014\n\004" + "name\030\002 \001(\t\022 \n\007devices\030\003 \003(\0132\017.context.De" + "vice\022\034\n\005links\030\004 \003(\0132\r.context.Link\022+\n\rop" + "tical_links\030\005 \003(\0132\024.context.OpticalLink\"" + ";\n\016TopologyIdList\022)\n\014topology_ids\030\001 \003(\0132" + "\023.context.TopologyId\"5\n\014TopologyList\022%\n\n" + "topologies\030\001 \003(\0132\021.context.Topology\"X\n\rT" + "opologyEvent\022\035\n\005event\030\001 \001(\0132\016.context.Ev" + "ent\022(\n\013topology_id\030\002 \001(\0132\023.context.Topol" + "ogyId\".\n\010DeviceId\022\"\n\013device_uuid\030\001 \001(\0132\r" + ".context.Uuid\"\372\002\n\006Device\022$\n\tdevice_id\030\001 " + "\001(\0132\021.context.DeviceId\022\014\n\004name\030\002 \001(\t\022\023\n\013" + "device_type\030\003 \001(\t\022,\n\rdevice_config\030\004 \001(\013" + "2\025.context.DeviceConfig\022G\n\031device_operat" + "ional_status\030\005 \001(\0162$.context.DeviceOpera" + "tionalStatusEnum\0221\n\016device_drivers\030\006 \003(\016" + "2\031.context.DeviceDriverEnum\022+\n\020device_en" + "dpoints\030\007 \003(\0132\021.context.EndPoint\022&\n\ncomp" + "onents\030\010 \003(\0132\022.context.Component\022(\n\rcont" + "roller_id\030\t \001(\0132\021.context.DeviceId\"\311\001\n\tC" + "omponent\022%\n\016component_uuid\030\001 \001(\0132\r.conte" + "xt.Uuid\022\014\n\004name\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\0226\n\na" + "ttributes\030\004 \003(\0132\".context.Component.Attr" + "ibutesEntry\022\016\n\006parent\030\005 \001(\t\0321\n\017Attribute" + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"9" + "\n\014DeviceConfig\022)\n\014config_rules\030\001 \003(\0132\023.c" + "ontext.ConfigRule\"5\n\014DeviceIdList\022%\n\ndev" + "ice_ids\030\001 \003(\0132\021.context.DeviceId\".\n\nDevi" + "ceList\022 \n\007devices\030\001 \003(\0132\017.context.Device" + "\"\216\001\n\014DeviceFilter\022)\n\ndevice_ids\030\001 \001(\0132\025." + "context.DeviceIdList\022\031\n\021include_endpoint" + "s\030\002 \001(\010\022\034\n\024include_config_rules\030\003 \001(\010\022\032\n" + "\022include_components\030\004 \001(\010\"\200\001\n\013DeviceEven" + "t\022\035\n\005event\030\001 \001(\0132\016.context.Event\022$\n\tdevi" + "ce_id\030\002 \001(\0132\021.context.DeviceId\022,\n\rdevice" + "_config\030\003 \001(\0132\025.context.DeviceConfig\"*\n\006" + "LinkId\022 \n\tlink_uuid\030\001 \001(\0132\r.context.Uuid" + "\"I\n\016LinkAttributes\022\033\n\023total_capacity_gbp" + "s\030\001 \001(\002\022\032\n\022used_capacity_gbps\030\002 \001(\002\"\275\001\n\004" + "Link\022 \n\007link_id\030\001 \001(\0132\017.context.LinkId\022\014" + "\n\004name\030\002 \001(\t\022.\n\021link_endpoint_ids\030\003 \003(\0132" + "\023.context.EndPointId\022+\n\nattributes\030\004 \001(\013" + "2\027.context.LinkAttributes\022(\n\tlink_type\030\005" + " \001(\0162\025.context.LinkTypeEnum\"/\n\nLinkIdLis" + "t\022!\n\010link_ids\030\001 \003(\0132\017.context.LinkId\"(\n\010" + "LinkList\022\034\n\005links\030\001 \003(\0132\r.context.Link\"L" + "\n\tLinkEvent\022\035\n\005event\030\001 \001(\0132\016.context.Eve" + "nt\022 \n\007link_id\030\002 \001(\0132\017.context.LinkId\"X\n\t" + "ServiceId\022&\n\ncontext_id\030\001 \001(\0132\022.context." + "ContextId\022#\n\014service_uuid\030\002 \001(\0132\r.contex" + "t.Uuid\"\333\002\n\007Service\022&\n\nservice_id\030\001 \001(\0132\022" + ".context.ServiceId\022\014\n\004name\030\002 \001(\t\022.\n\014serv" + "ice_type\030\003 \001(\0162\030.context.ServiceTypeEnum" + "\0221\n\024service_endpoint_ids\030\004 \003(\0132\023.context" + ".EndPointId\0220\n\023service_constraints\030\005 \003(\013" + "2\023.context.Constraint\022.\n\016service_status\030" + "\006 \001(\0132\026.context.ServiceStatus\022.\n\016service" + "_config\030\007 \001(\0132\026.context.ServiceConfig\022%\n" + "\ttimestamp\030\010 \001(\0132\022.context.Timestamp\"C\n\r" + "ServiceStatus\0222\n\016service_status\030\001 \001(\0162\032." + "context.ServiceStatusEnum\":\n\rServiceConf" + "ig\022)\n\014config_rules\030\001 \003(\0132\023.context.Confi" + "gRule\"8\n\rServiceIdList\022\'\n\013service_ids\030\001 " + "\003(\0132\022.context.ServiceId\"1\n\013ServiceList\022\"" + "\n\010services\030\001 \003(\0132\020.context.Service\"\225\001\n\rS" + "erviceFilter\022+\n\013service_ids\030\001 \001(\0132\026.cont" + "ext.ServiceIdList\022\034\n\024include_endpoint_id" + "s\030\002 \001(\010\022\033\n\023include_constraints\030\003 \001(\010\022\034\n\024" + "include_config_rules\030\004 \001(\010\"U\n\014ServiceEve" + "nt\022\035\n\005event\030\001 \001(\0132\016.context.Event\022&\n\nser" + "vice_id\030\002 \001(\0132\022.context.ServiceId\"T\n\007Sli" + "ceId\022&\n\ncontext_id\030\001 \001(\0132\022.context.Conte" + "xtId\022!\n\nslice_uuid\030\002 \001(\0132\r.context.Uuid\"" + "\240\003\n\005Slice\022\"\n\010slice_id\030\001 \001(\0132\020.context.Sl" + "iceId\022\014\n\004name\030\002 \001(\t\022/\n\022slice_endpoint_id" + "s\030\003 \003(\0132\023.context.EndPointId\022.\n\021slice_co" + "nstraints\030\004 \003(\0132\023.context.Constraint\022-\n\021" + "slice_service_ids\030\005 \003(\0132\022.context.Servic" + "eId\022,\n\022slice_subslice_ids\030\006 \003(\0132\020.contex" + "t.SliceId\022*\n\014slice_status\030\007 \001(\0132\024.contex" + "t.SliceStatus\022*\n\014slice_config\030\010 \001(\0132\024.co" + "ntext.SliceConfig\022(\n\013slice_owner\030\t \001(\0132\023" + ".context.SliceOwner\022%\n\ttimestamp\030\n \001(\0132\022" + ".context.Timestamp\"E\n\nSliceOwner\022!\n\nowne" + "r_uuid\030\001 \001(\0132\r.context.Uuid\022\024\n\014owner_str" + "ing\030\002 \001(\t\"=\n\013SliceStatus\022.\n\014slice_status" + "\030\001 \001(\0162\030.context.SliceStatusEnum\"8\n\013Slic" + "eConfig\022)\n\014config_rules\030\001 \003(\0132\023.context." + "ConfigRule\"2\n\013SliceIdList\022#\n\tslice_ids\030\001" + " \003(\0132\020.context.SliceId\"+\n\tSliceList\022\036\n\006s" + "lices\030\001 \003(\0132\016.context.Slice\"\312\001\n\013SliceFil" + "ter\022\'\n\tslice_ids\030\001 \001(\0132\024.context.SliceId" + "List\022\034\n\024include_endpoint_ids\030\002 \001(\010\022\033\n\023in" + "clude_constraints\030\003 \001(\010\022\033\n\023include_servi" + "ce_ids\030\004 \001(\010\022\034\n\024include_subslice_ids\030\005 \001" + "(\010\022\034\n\024include_config_rules\030\006 \001(\010\"O\n\nSlic" + "eEvent\022\035\n\005event\030\001 \001(\0132\016.context.Event\022\"\n" + "\010slice_id\030\002 \001(\0132\020.context.SliceId\"6\n\014Con" + "nectionId\022&\n\017connection_uuid\030\001 \001(\0132\r.con" + "text.Uuid\"2\n\025ConnectionSettings_L0\022\031\n\021ls" + "p_symbolic_name\030\001 \001(\t\"\236\001\n\025ConnectionSett" + "ings_L2\022\027\n\017src_mac_address\030\001 \001(\t\022\027\n\017dst_" + "mac_address\030\002 \001(\t\022\022\n\nether_type\030\003 \001(\r\022\017\n" + "\007vlan_id\030\004 \001(\r\022\022\n\nmpls_label\030\005 \001(\r\022\032\n\022mp" + "ls_traffic_class\030\006 \001(\r\"t\n\025ConnectionSett" + "ings_L3\022\026\n\016src_ip_address\030\001 \001(\t\022\026\n\016dst_i" + "p_address\030\002 \001(\t\022\014\n\004dscp\030\003 \001(\r\022\020\n\010protoco" + "l\030\004 \001(\r\022\013\n\003ttl\030\005 \001(\r\"[\n\025ConnectionSettin" + "gs_L4\022\020\n\010src_port\030\001 \001(\r\022\020\n\010dst_port\030\002 \001(" + "\r\022\021\n\ttcp_flags\030\003 \001(\r\022\013\n\003ttl\030\004 \001(\r\"\304\001\n\022Co" + "nnectionSettings\022*\n\002l0\030\001 \001(\0132\036.context.C" + "onnectionSettings_L0\022*\n\002l2\030\002 \001(\0132\036.conte" + "xt.ConnectionSettings_L2\022*\n\002l3\030\003 \001(\0132\036.c" + "ontext.ConnectionSettings_L3\022*\n\002l4\030\004 \001(\013" + "2\036.context.ConnectionSettings_L4\"\363\001\n\nCon" + "nection\022,\n\rconnection_id\030\001 \001(\0132\025.context" + ".ConnectionId\022&\n\nservice_id\030\002 \001(\0132\022.cont" + "ext.ServiceId\0223\n\026path_hops_endpoint_ids\030" + "\003 \003(\0132\023.context.EndPointId\022+\n\017sub_servic" + "e_ids\030\004 \003(\0132\022.context.ServiceId\022-\n\010setti" + "ngs\030\005 \001(\0132\033.context.ConnectionSettings\"A" + "\n\020ConnectionIdList\022-\n\016connection_ids\030\001 \003" + "(\0132\025.context.ConnectionId\":\n\016ConnectionL" + "ist\022(\n\013connections\030\001 \003(\0132\023.context.Conne" + "ction\"^\n\017ConnectionEvent\022\035\n\005event\030\001 \001(\0132" + "\016.context.Event\022,\n\rconnection_id\030\002 \001(\0132\025" + ".context.ConnectionId\"\202\001\n\nEndPointId\022(\n\013" + "topology_id\030\001 \001(\0132\023.context.TopologyId\022$" + "\n\tdevice_id\030\002 \001(\0132\021.context.DeviceId\022$\n\r" + "endpoint_uuid\030\003 \001(\0132\r.context.Uuid\"\302\001\n\010E" + "ndPoint\022(\n\013endpoint_id\030\001 \001(\0132\023.context.E" + "ndPointId\022\014\n\004name\030\002 \001(\t\022\025\n\rendpoint_type" + "\030\003 \001(\t\0229\n\020kpi_sample_types\030\004 \003(\0162\037.kpi_s" + "ample_types.KpiSampleType\022,\n\021endpoint_lo" + "cation\030\005 \001(\0132\021.context.Location\"{\n\014EndPo" + "intName\022(\n\013endpoint_id\030\001 \001(\0132\023.context.E" + "ndPointId\022\023\n\013device_name\030\002 \001(\t\022\025\n\rendpoi" + "nt_name\030\003 \001(\t\022\025\n\rendpoint_type\030\004 \001(\t\";\n\016" + "EndPointIdList\022)\n\014endpoint_ids\030\001 \003(\0132\023.c" + "ontext.EndPointId\"A\n\020EndPointNameList\022-\n" + "\016endpoint_names\030\001 \003(\0132\025.context.EndPoint" + "Name\"A\n\021ConfigRule_Custom\022\024\n\014resource_ke" + "y\030\001 \001(\t\022\026\n\016resource_value\030\002 \001(\t\"]\n\016Confi" + "gRule_ACL\022(\n\013endpoint_id\030\001 \001(\0132\023.context" + ".EndPointId\022!\n\010rule_set\030\002 \001(\0132\017.acl.AclR" + "uleSet\"\234\001\n\nConfigRule\022)\n\006action\030\001 \001(\0162\031." + "context.ConfigActionEnum\022,\n\006custom\030\002 \001(\013" + "2\032.context.ConfigRule_CustomH\000\022&\n\003acl\030\003 " + "\001(\0132\027.context.ConfigRule_ACLH\000B\r\n\013config" + "_rule\"F\n\021Constraint_Custom\022\027\n\017constraint" + "_type\030\001 \001(\t\022\030\n\020constraint_value\030\002 \001(\t\"E\n" + "\023Constraint_Schedule\022\027\n\017start_timestamp\030" + "\001 \001(\001\022\025\n\rduration_days\030\002 \001(\002\"3\n\014GPS_Posi" + "tion\022\020\n\010latitude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001(" + "\002\"\204\001\n\010Location\022\020\n\006region\030\001 \001(\tH\000\022-\n\014gps_" + "position\030\002 \001(\0132\025.context.GPS_PositionH\000\022" + "\023\n\tinterface\030\003 \001(\tH\000\022\026\n\014circuit_pack\030\004 \001" + "(\tH\000B\n\n\010location\"l\n\033Constraint_EndPointL" + "ocation\022(\n\013endpoint_id\030\001 \001(\0132\023.context.E" + "ndPointId\022#\n\010location\030\002 \001(\0132\021.context.Lo" + "cation\"Y\n\033Constraint_EndPointPriority\022(\n" + "\013endpoint_id\030\001 \001(\0132\023.context.EndPointId\022" + "\020\n\010priority\030\002 \001(\r\"0\n\026Constraint_SLA_Late" + "ncy\022\026\n\016e2e_latency_ms\030\001 \001(\002\"0\n\027Constrain" + "t_SLA_Capacity\022\025\n\rcapacity_gbps\030\001 \001(\002\"c\n" + "\033Constraint_SLA_Availability\022\032\n\022num_disj" + "oint_paths\030\001 \001(\r\022\022\n\nall_active\030\002 \001(\010\022\024\n\014" + "availability\030\003 \001(\002\"V\n\036Constraint_SLA_Iso" + "lation_level\0224\n\017isolation_level\030\001 \003(\0162\033." + "context.IsolationLevelEnum\"\242\001\n\025Constrain" + "t_Exclusions\022\024\n\014is_permanent\030\001 \001(\010\022%\n\nde" + "vice_ids\030\002 \003(\0132\021.context.DeviceId\022)\n\014end" + "point_ids\030\003 \003(\0132\023.context.EndPointId\022!\n\010" + "link_ids\030\004 \003(\0132\017.context.LinkId\"5\n\014QoSPr" + "ofileId\022%\n\016qos_profile_id\030\001 \001(\0132\r.contex" + "t.Uuid\"`\n\025Constraint_QoSProfile\022-\n\016qos_p" + "rofile_id\030\001 \001(\0132\025.context.QoSProfileId\022\030" + "\n\020qos_profile_name\030\002 \001(\t\"\222\005\n\nConstraint\022" + "-\n\006action\030\001 \001(\0162\035.context.ConstraintActi" + "onEnum\022,\n\006custom\030\002 \001(\0132\032.context.Constra" + "int_CustomH\000\0220\n\010schedule\030\003 \001(\0132\034.context" + ".Constraint_ScheduleH\000\022A\n\021endpoint_locat" + "ion\030\004 \001(\0132$.context.Constraint_EndPointL" + "ocationH\000\022A\n\021endpoint_priority\030\005 \001(\0132$.c" + "ontext.Constraint_EndPointPriorityH\000\0228\n\014" + "sla_capacity\030\006 \001(\0132 .context.Constraint_" + "SLA_CapacityH\000\0226\n\013sla_latency\030\007 \001(\0132\037.co" + "ntext.Constraint_SLA_LatencyH\000\022@\n\020sla_av" + "ailability\030\010 \001(\0132$.context.Constraint_SL" + "A_AvailabilityH\000\022@\n\rsla_isolation\030\t \001(\0132" + "\'.context.Constraint_SLA_Isolation_level" + "H\000\0224\n\nexclusions\030\n \001(\0132\036.context.Constra" + "int_ExclusionsH\000\0225\n\013qos_profile\030\013 \001(\0132\036." + "context.Constraint_QoSProfileH\000B\014\n\nconst" + "raint\"^\n\022TeraFlowController\022&\n\ncontext_i" + "d\030\001 \001(\0132\022.context.ContextId\022\022\n\nip_addres" + "s\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n\024AuthenticationR" + "esult\022&\n\ncontext_id\030\001 \001(\0132\022.context.Cont" + "extId\022\025\n\rauthenticated\030\002 \001(\010\"-\n\017OpticalC" + "onfigId\022\032\n\022opticalconfig_uuid\030\001 \001(\t\"y\n\rO" + "pticalConfig\0222\n\020opticalconfig_id\030\001 \001(\0132\030" + ".context.OpticalConfigId\022\016\n\006config\030\002 \001(\t" + "\022$\n\tdevice_id\030\003 \001(\0132\021.context.DeviceId\"C" + "\n\021OpticalConfigList\022.\n\016opticalconfigs\030\001 " + "\003(\0132\026.context.OpticalConfig\"g\n\022OpticalCo" + "nfigEvent\022\035\n\005event\030\001 \001(\0132\016.context.Event" + "\0222\n\020opticalconfig_id\030\002 \001(\0132\030.context.Opt" + "icalConfigId\"_\n\021OpticalEndPointId\022$\n\tdev" + "ice_id\030\002 \001(\0132\021.context.DeviceId\022$\n\rendpo" + "int_uuid\030\003 \001(\0132\r.context.Uuid\">\n\017Optical" + "LinkList\022+\n\roptical_links\030\001 \003(\0132\024.contex" + "t.OpticalLink\"\304\003\n\022OpticalLinkDetails\022\016\n\006" + "length\030\001 \001(\002\022\020\n\010src_port\030\002 \001(\t\022\020\n\010dst_po" + "rt\030\003 \001(\t\022\027\n\017local_peer_port\030\004 \001(\t\022\030\n\020rem" + "ote_peer_port\030\005 \001(\t\022\014\n\004used\030\006 \001(\010\0228\n\007c_s" + "lots\030\007 \003(\0132\'.context.OpticalLinkDetails." + "CSlotsEntry\0228\n\007l_slots\030\010 \003(\0132\'.context.O" + "pticalLinkDetails.LSlotsEntry\0228\n\007s_slots" + "\030\t \003(\0132\'.context.OpticalLinkDetails.SSlo" + "tsEntry\032-\n\013CSlotsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + "alue\030\002 \001(\005:\0028\001\032-\n\013LSlotsEntry\022\013\n\003key\030\001 \001" + "(\t\022\r\n\005value\030\002 \001(\005:\0028\001\032-\n\013SSlotsEntry\022\013\n\003" + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\"\243\001\n\013Optical" + "Link\022\014\n\004name\030\001 \001(\t\0224\n\017optical_details\030\002 " + "\001(\0132\033.context.OpticalLinkDetails\022 \n\007link" + "_id\030\003 \001(\0132\017.context.LinkId\022.\n\021link_endpo" + "int_ids\030\004 \003(\0132\023.context.EndPointId\"r\n\021Se" + "rviceConfigRule\022&\n\nservice_id\030\001 \001(\0132\022.co" + "ntext.ServiceId\0225\n\021configrule_custom\030\002 \001" + "(\0132\032.context.ConfigRule_Custom*j\n\rEventT" + "ypeEnum\022\027\n\023EVENTTYPE_UNDEFINED\020\000\022\024\n\020EVEN" + "TTYPE_CREATE\020\001\022\024\n\020EVENTTYPE_UPDATE\020\002\022\024\n\020" + "EVENTTYPE_REMOVE\020\003*\224\003\n\020DeviceDriverEnum\022" + "\032\n\026DEVICEDRIVER_UNDEFINED\020\000\022\033\n\027DEVICEDRI" + "VER_OPENCONFIG\020\001\022\036\n\032DEVICEDRIVER_TRANSPO" + "RT_API\020\002\022\023\n\017DEVICEDRIVER_P4\020\003\022&\n\"DEVICED" + "RIVER_IETF_NETWORK_TOPOLOGY\020\004\022\033\n\027DEVICED" + "RIVER_ONF_TR_532\020\005\022\023\n\017DEVICEDRIVER_XR\020\006\022" + "\033\n\027DEVICEDRIVER_IETF_L2VPN\020\007\022 \n\034DEVICEDR" + "IVER_GNMI_OPENCONFIG\020\010\022\034\n\030DEVICEDRIVER_O" + "PTICAL_TFS\020\t\022\032\n\026DEVICEDRIVER_IETF_ACTN\020\n" + "\022\023\n\017DEVICEDRIVER_OC\020\013\022\024\n\020DEVICEDRIVER_QK" + "D\020\014\022\024\n\020DEVICEDRIVER_PON\020\r*\217\001\n\033DeviceOper" + "ationalStatusEnum\022%\n!DEVICEOPERATIONALST" + "ATUS_UNDEFINED\020\000\022$\n DEVICEOPERATIONALSTA" + "TUS_DISABLED\020\001\022#\n\037DEVICEOPERATIONALSTATU" + "S_ENABLED\020\002*\212\001\n\014LinkTypeEnum\022\024\n\020LINKTYPE" + "_UNKNOWN\020\000\022\023\n\017LINKTYPE_COPPER\020\001\022\033\n\027LINKT" + "YPE_VIRTUAL_COPPER\020\002\022\024\n\020LINKTYPE_OPTICAL" + "\020\003\022\034\n\030LINKTYPE_VIRTUAL_OPTICAL\020\004*\345\001\n\017Ser" + "viceTypeEnum\022\027\n\023SERVICETYPE_UNKNOWN\020\000\022\024\n" + "\020SERVICETYPE_L3NM\020\001\022\024\n\020SERVICETYPE_L2NM\020" + "\002\022)\n%SERVICETYPE_TAPI_CONNECTIVITY_SERVI" + "CE\020\003\022\022\n\016SERVICETYPE_TE\020\004\022\023\n\017SERVICETYPE_" + "E2E\020\005\022$\n SERVICETYPE_OPTICAL_CONNECTIVIT" + "Y\020\006\022\023\n\017SERVICETYPE_QKD\020\007*\304\001\n\021ServiceStat" + "usEnum\022\033\n\027SERVICESTATUS_UNDEFINED\020\000\022\031\n\025S" + "ERVICESTATUS_PLANNED\020\001\022\030\n\024SERVICESTATUS_" + "ACTIVE\020\002\022\032\n\026SERVICESTATUS_UPDATING\020\003\022!\n\035" + "SERVICESTATUS_PENDING_REMOVAL\020\004\022\036\n\032SERVI" + "CESTATUS_SLA_VIOLATED\020\005*\251\001\n\017SliceStatusE" + "num\022\031\n\025SLICESTATUS_UNDEFINED\020\000\022\027\n\023SLICES" + "TATUS_PLANNED\020\001\022\024\n\020SLICESTATUS_INIT\020\002\022\026\n" + "\022SLICESTATUS_ACTIVE\020\003\022\026\n\022SLICESTATUS_DEI" + "NIT\020\004\022\034\n\030SLICESTATUS_SLA_VIOLATED\020\005*]\n\020C" + "onfigActionEnum\022\032\n\026CONFIGACTION_UNDEFINE" + "D\020\000\022\024\n\020CONFIGACTION_SET\020\001\022\027\n\023CONFIGACTIO" + "N_DELETE\020\002*m\n\024ConstraintActionEnum\022\036\n\032CO" + "NSTRAINTACTION_UNDEFINED\020\000\022\030\n\024CONSTRAINT" + "ACTION_SET\020\001\022\033\n\027CONSTRAINTACTION_DELETE\020" + "\002*\203\002\n\022IsolationLevelEnum\022\020\n\014NO_ISOLATION" + "\020\000\022\026\n\022PHYSICAL_ISOLATION\020\001\022\025\n\021LOGICAL_IS" + "OLATION\020\002\022\025\n\021PROCESS_ISOLATION\020\003\022\035\n\031PHYS" + "ICAL_MEMORY_ISOLATION\020\004\022\036\n\032PHYSICAL_NETW" + "ORK_ISOLATION\020\005\022\036\n\032VIRTUAL_RESOURCE_ISOL" + "ATION\020\006\022\037\n\033NETWORK_FUNCTIONS_ISOLATION\020\007" + "\022\025\n\021SERVICE_ISOLATION\020\0102\202\034\n\016ContextServi" + "ce\022:\n\016ListContextIds\022\016.context.Empty\032\026.c" + "ontext.ContextIdList\"\000\0226\n\014ListContexts\022\016" + ".context.Empty\032\024.context.ContextList\"\000\0224" + "\n\nGetContext\022\022.context.ContextId\032\020.conte" + "xt.Context\"\000\0224\n\nSetContext\022\020.context.Con" + "text\032\022.context.ContextId\"\000\0225\n\rRemoveCont" + "ext\022\022.context.ContextId\032\016.context.Empty\"" + "\000\022=\n\020GetContextEvents\022\016.context.Empty\032\025." + "context.ContextEvent\"\0000\001\022@\n\017ListTopology" + "Ids\022\022.context.ContextId\032\027.context.Topolo" + "gyIdList\"\000\022=\n\016ListTopologies\022\022.context.C" + "ontextId\032\025.context.TopologyList\"\000\0227\n\013Get" + "Topology\022\023.context.TopologyId\032\021.context." + "Topology\"\000\022E\n\022GetTopologyDetails\022\023.conte" + "xt.TopologyId\032\030.context.TopologyDetails\"" + "\000\0227\n\013SetTopology\022\021.context.Topology\032\023.co" + "ntext.TopologyId\"\000\0227\n\016RemoveTopology\022\023.c" + "ontext.TopologyId\032\016.context.Empty\"\000\022?\n\021G" + "etTopologyEvents\022\016.context.Empty\032\026.conte" + "xt.TopologyEvent\"\0000\001\0228\n\rListDeviceIds\022\016." + "context.Empty\032\025.context.DeviceIdList\"\000\0224" + "\n\013ListDevices\022\016.context.Empty\032\023.context." + "DeviceList\"\000\0221\n\tGetDevice\022\021.context.Devi" + "ceId\032\017.context.Device\"\000\0221\n\tSetDevice\022\017.c" + "ontext.Device\032\021.context.DeviceId\"\000\0223\n\014Re" + "moveDevice\022\021.context.DeviceId\032\016.context." + "Empty\"\000\022;\n\017GetDeviceEvents\022\016.context.Emp" + "ty\032\024.context.DeviceEvent\"\0000\001\022<\n\014SelectDe" + "vice\022\025.context.DeviceFilter\032\023.context.De" + "viceList\"\000\022I\n\021ListEndPointNames\022\027.contex" + "t.EndPointIdList\032\031.context.EndPointNameL" + "ist\"\000\0224\n\013ListLinkIds\022\016.context.Empty\032\023.c" + "ontext.LinkIdList\"\000\0220\n\tListLinks\022\016.conte" + "xt.Empty\032\021.context.LinkList\"\000\022+\n\007GetLink" + "\022\017.context.LinkId\032\r.context.Link\"\000\022+\n\007Se" + "tLink\022\r.context.Link\032\017.context.LinkId\"\000\022" + "/\n\nRemoveLink\022\017.context.LinkId\032\016.context" + ".Empty\"\000\0227\n\rGetLinkEvents\022\016.context.Empt" + "y\032\022.context.LinkEvent\"\0000\001\022>\n\016ListService" + "Ids\022\022.context.ContextId\032\026.context.Servic" + "eIdList\"\000\022:\n\014ListServices\022\022.context.Cont" + "extId\032\024.context.ServiceList\"\000\0224\n\nGetServ" + "ice\022\022.context.ServiceId\032\020.context.Servic" + "e\"\000\0224\n\nSetService\022\020.context.Service\032\022.co" + "ntext.ServiceId\"\000\0226\n\014UnsetService\022\020.cont" + "ext.Service\032\022.context.ServiceId\"\000\0225\n\rRem" + "oveService\022\022.context.ServiceId\032\016.context" + ".Empty\"\000\022=\n\020GetServiceEvents\022\016.context.E" + "mpty\032\025.context.ServiceEvent\"\0000\001\022?\n\rSelec" + "tService\022\026.context.ServiceFilter\032\024.conte" + "xt.ServiceList\"\000\022:\n\014ListSliceIds\022\022.conte" + "xt.ContextId\032\024.context.SliceIdList\"\000\0226\n\n" + "ListSlices\022\022.context.ContextId\032\022.context" + ".SliceList\"\000\022.\n\010GetSlice\022\020.context.Slice" + "Id\032\016.context.Slice\"\000\022.\n\010SetSlice\022\016.conte" + "xt.Slice\032\020.context.SliceId\"\000\0220\n\nUnsetSli" + "ce\022\016.context.Slice\032\020.context.SliceId\"\000\0221" + "\n\013RemoveSlice\022\020.context.SliceId\032\016.contex" + "t.Empty\"\000\0229\n\016GetSliceEvents\022\016.context.Em" + "pty\032\023.context.SliceEvent\"\0000\001\0229\n\013SelectSl" + "ice\022\024.context.SliceFilter\032\022.context.Slic" + "eList\"\000\022D\n\021ListConnectionIds\022\022.context.S" + "erviceId\032\031.context.ConnectionIdList\"\000\022@\n" + "\017ListConnections\022\022.context.ServiceId\032\027.c" + "ontext.ConnectionList\"\000\022=\n\rGetConnection" + "\022\025.context.ConnectionId\032\023.context.Connec" + "tion\"\000\022=\n\rSetConnection\022\023.context.Connec" + "tion\032\025.context.ConnectionId\"\000\022;\n\020RemoveC" + "onnection\022\025.context.ConnectionId\032\016.conte" + "xt.Empty\"\000\022C\n\023GetConnectionEvents\022\016.cont" + "ext.Empty\032\030.context.ConnectionEvent\"\0000\001\022" + "@\n\020GetOpticalConfig\022\016.context.Empty\032\032.co" + "ntext.OpticalConfigList\"\000\022F\n\020SetOpticalC" + "onfig\022\026.context.OpticalConfig\032\030.context." + "OpticalConfigId\"\000\022I\n\023UpdateOpticalConfig" + "\022\026.context.OpticalConfig\032\030.context.Optic" + "alConfigId\"\000\022I\n\023SelectOpticalConfig\022\030.co" + "ntext.OpticalConfigId\032\026.context.OpticalC" + "onfig\"\000\022A\n\023DeleteOpticalConfig\022\030.context" + ".OpticalConfigId\032\016.context.Empty\"\000\022@\n\024De" + "leteOpticalChannel\022\026.context.OpticalConf" + "ig\032\016.context.Empty\"\000\0228\n\016SetOpticalLink\022\024" + ".context.OpticalLink\032\016.context.Empty\"\000\0229" + "\n\016GetOpticalLink\022\017.context.LinkId\032\024.cont" + "ext.OpticalLink\"\000\0226\n\021DeleteOpticalLink\022\017" + ".context.LinkId\032\016.context.Empty\"\000\022@\n\022Get" + "OpticalLinkList\022\016.context.Empty\032\030.contex" + "t.OpticalLinkList\"\000\022G\n\027DeleteServiceConf" + "igRule\022\032.context.ServiceConfigRule\032\016.con" + "text.Empty\"\000b\006proto3" }; + java.lang.String[] descriptorData = { "\n\rcontext.proto\022\007context\032\tacl.proto\032\026kpi" + "_sample_types.proto\"\007\n\005Empty\"\024\n\004Uuid\022\014\n\004" + "uuid\030\001 \001(\t\"\036\n\tTimestamp\022\021\n\ttimestamp\030\001 \001" + "(\001\"Z\n\005Event\022%\n\ttimestamp\030\001 \001(\0132\022.context" + ".Timestamp\022*\n\nevent_type\030\002 \001(\0162\026.context" + ".EventTypeEnum\"0\n\tContextId\022#\n\014context_u" + "uid\030\001 \001(\0132\r.context.Uuid\"\351\001\n\007Context\022&\n\n" + "context_id\030\001 \001(\0132\022.context.ContextId\022\014\n\004" + "name\030\002 \001(\t\022)\n\014topology_ids\030\003 \003(\0132\023.conte" + "xt.TopologyId\022\'\n\013service_ids\030\004 \003(\0132\022.con" + "text.ServiceId\022#\n\tslice_ids\030\005 \003(\0132\020.cont" + "ext.SliceId\022/\n\ncontroller\030\006 \001(\0132\033.contex" + "t.TeraFlowController\"8\n\rContextIdList\022\'\n" + "\013context_ids\030\001 \003(\0132\022.context.ContextId\"1" + "\n\013ContextList\022\"\n\010contexts\030\001 \003(\0132\020.contex" + "t.Context\"U\n\014ContextEvent\022\035\n\005event\030\001 \001(\013" + "2\016.context.Event\022&\n\ncontext_id\030\002 \001(\0132\022.c" + "ontext.ContextId\"Z\n\nTopologyId\022&\n\ncontex" + "t_id\030\001 \001(\0132\022.context.ContextId\022$\n\rtopolo" + "gy_uuid\030\002 \001(\0132\r.context.Uuid\"\267\001\n\010Topolog" + "y\022(\n\013topology_id\030\001 \001(\0132\023.context.Topolog" + "yId\022\014\n\004name\030\002 \001(\t\022%\n\ndevice_ids\030\003 \003(\0132\021." + "context.DeviceId\022!\n\010link_ids\030\004 \003(\0132\017.con" + "text.LinkId\022)\n\020optical_link_ids\030\005 \003(\0132\017." + "context.LinkId\"\266\001\n\017TopologyDetails\022(\n\013to" + "pology_id\030\001 \001(\0132\023.context.TopologyId\022\014\n\004" + "name\030\002 \001(\t\022 \n\007devices\030\003 \003(\0132\017.context.De" + "vice\022\034\n\005links\030\004 \003(\0132\r.context.Link\022+\n\rop" + "tical_links\030\005 \003(\0132\024.context.OpticalLink\"" + ";\n\016TopologyIdList\022)\n\014topology_ids\030\001 \003(\0132" + "\023.context.TopologyId\"5\n\014TopologyList\022%\n\n" + "topologies\030\001 \003(\0132\021.context.Topology\"X\n\rT" + "opologyEvent\022\035\n\005event\030\001 \001(\0132\016.context.Ev" + "ent\022(\n\013topology_id\030\002 \001(\0132\023.context.Topol" + "ogyId\".\n\010DeviceId\022\"\n\013device_uuid\030\001 \001(\0132\r" + ".context.Uuid\"\372\002\n\006Device\022$\n\tdevice_id\030\001 " + "\001(\0132\021.context.DeviceId\022\014\n\004name\030\002 \001(\t\022\023\n\013" + "device_type\030\003 \001(\t\022,\n\rdevice_config\030\004 \001(\013" + "2\025.context.DeviceConfig\022G\n\031device_operat" + "ional_status\030\005 \001(\0162$.context.DeviceOpera" + "tionalStatusEnum\0221\n\016device_drivers\030\006 \003(\016" + "2\031.context.DeviceDriverEnum\022+\n\020device_en" + "dpoints\030\007 \003(\0132\021.context.EndPoint\022&\n\ncomp" + "onents\030\010 \003(\0132\022.context.Component\022(\n\rcont" + "roller_id\030\t \001(\0132\021.context.DeviceId\"\311\001\n\tC" + "omponent\022%\n\016component_uuid\030\001 \001(\0132\r.conte" + "xt.Uuid\022\014\n\004name\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\0226\n\na" + "ttributes\030\004 \003(\0132\".context.Component.Attr" + "ibutesEntry\022\016\n\006parent\030\005 \001(\t\0321\n\017Attribute" + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"9" + "\n\014DeviceConfig\022)\n\014config_rules\030\001 \003(\0132\023.c" + "ontext.ConfigRule\"5\n\014DeviceIdList\022%\n\ndev" + "ice_ids\030\001 \003(\0132\021.context.DeviceId\".\n\nDevi" + "ceList\022 \n\007devices\030\001 \003(\0132\017.context.Device" + "\"\216\001\n\014DeviceFilter\022)\n\ndevice_ids\030\001 \001(\0132\025." + "context.DeviceIdList\022\031\n\021include_endpoint" + "s\030\002 \001(\010\022\034\n\024include_config_rules\030\003 \001(\010\022\032\n" + "\022include_components\030\004 \001(\010\"\200\001\n\013DeviceEven" + "t\022\035\n\005event\030\001 \001(\0132\016.context.Event\022$\n\tdevi" + "ce_id\030\002 \001(\0132\021.context.DeviceId\022,\n\rdevice" + "_config\030\003 \001(\0132\025.context.DeviceConfig\"*\n\006" + "LinkId\022 \n\tlink_uuid\030\001 \001(\0132\r.context.Uuid" + "\"I\n\016LinkAttributes\022\033\n\023total_capacity_gbp" + "s\030\001 \001(\002\022\032\n\022used_capacity_gbps\030\002 \001(\002\"\275\001\n\004" + "Link\022 \n\007link_id\030\001 \001(\0132\017.context.LinkId\022\014" + "\n\004name\030\002 \001(\t\022(\n\tlink_type\030\003 \001(\0162\025.contex" + "t.LinkTypeEnum\022.\n\021link_endpoint_ids\030\004 \003(" + "\0132\023.context.EndPointId\022+\n\nattributes\030\005 \001" + "(\0132\027.context.LinkAttributes\"/\n\nLinkIdLis" + "t\022!\n\010link_ids\030\001 \003(\0132\017.context.LinkId\"(\n\010" + "LinkList\022\034\n\005links\030\001 \003(\0132\r.context.Link\"L" + "\n\tLinkEvent\022\035\n\005event\030\001 \001(\0132\016.context.Eve" + "nt\022 \n\007link_id\030\002 \001(\0132\017.context.LinkId\"X\n\t" + "ServiceId\022&\n\ncontext_id\030\001 \001(\0132\022.context." + "ContextId\022#\n\014service_uuid\030\002 \001(\0132\r.contex" + "t.Uuid\"\333\002\n\007Service\022&\n\nservice_id\030\001 \001(\0132\022" + ".context.ServiceId\022\014\n\004name\030\002 \001(\t\022.\n\014serv" + "ice_type\030\003 \001(\0162\030.context.ServiceTypeEnum" + "\0221\n\024service_endpoint_ids\030\004 \003(\0132\023.context" + ".EndPointId\0220\n\023service_constraints\030\005 \003(\013" + "2\023.context.Constraint\022.\n\016service_status\030" + "\006 \001(\0132\026.context.ServiceStatus\022.\n\016service" + "_config\030\007 \001(\0132\026.context.ServiceConfig\022%\n" + "\ttimestamp\030\010 \001(\0132\022.context.Timestamp\"C\n\r" + "ServiceStatus\0222\n\016service_status\030\001 \001(\0162\032." + "context.ServiceStatusEnum\":\n\rServiceConf" + "ig\022)\n\014config_rules\030\001 \003(\0132\023.context.Confi" + "gRule\"8\n\rServiceIdList\022\'\n\013service_ids\030\001 " + "\003(\0132\022.context.ServiceId\"1\n\013ServiceList\022\"" + "\n\010services\030\001 \003(\0132\020.context.Service\"\225\001\n\rS" + "erviceFilter\022+\n\013service_ids\030\001 \001(\0132\026.cont" + "ext.ServiceIdList\022\034\n\024include_endpoint_id" + "s\030\002 \001(\010\022\033\n\023include_constraints\030\003 \001(\010\022\034\n\024" + "include_config_rules\030\004 \001(\010\"U\n\014ServiceEve" + "nt\022\035\n\005event\030\001 \001(\0132\016.context.Event\022&\n\nser" + "vice_id\030\002 \001(\0132\022.context.ServiceId\"T\n\007Sli" + "ceId\022&\n\ncontext_id\030\001 \001(\0132\022.context.Conte" + "xtId\022!\n\nslice_uuid\030\002 \001(\0132\r.context.Uuid\"" + "\240\003\n\005Slice\022\"\n\010slice_id\030\001 \001(\0132\020.context.Sl" + "iceId\022\014\n\004name\030\002 \001(\t\022/\n\022slice_endpoint_id" + "s\030\003 \003(\0132\023.context.EndPointId\022.\n\021slice_co" + "nstraints\030\004 \003(\0132\023.context.Constraint\022-\n\021" + "slice_service_ids\030\005 \003(\0132\022.context.Servic" + "eId\022,\n\022slice_subslice_ids\030\006 \003(\0132\020.contex" + "t.SliceId\022*\n\014slice_status\030\007 \001(\0132\024.contex" + "t.SliceStatus\022*\n\014slice_config\030\010 \001(\0132\024.co" + "ntext.SliceConfig\022(\n\013slice_owner\030\t \001(\0132\023" + ".context.SliceOwner\022%\n\ttimestamp\030\n \001(\0132\022" + ".context.Timestamp\"E\n\nSliceOwner\022!\n\nowne" + "r_uuid\030\001 \001(\0132\r.context.Uuid\022\024\n\014owner_str" + "ing\030\002 \001(\t\"=\n\013SliceStatus\022.\n\014slice_status" + "\030\001 \001(\0162\030.context.SliceStatusEnum\"8\n\013Slic" + "eConfig\022)\n\014config_rules\030\001 \003(\0132\023.context." + "ConfigRule\"2\n\013SliceIdList\022#\n\tslice_ids\030\001" + " \003(\0132\020.context.SliceId\"+\n\tSliceList\022\036\n\006s" + "lices\030\001 \003(\0132\016.context.Slice\"\312\001\n\013SliceFil" + "ter\022\'\n\tslice_ids\030\001 \001(\0132\024.context.SliceId" + "List\022\034\n\024include_endpoint_ids\030\002 \001(\010\022\033\n\023in" + "clude_constraints\030\003 \001(\010\022\033\n\023include_servi" + "ce_ids\030\004 \001(\010\022\034\n\024include_subslice_ids\030\005 \001" + "(\010\022\034\n\024include_config_rules\030\006 \001(\010\"O\n\nSlic" + "eEvent\022\035\n\005event\030\001 \001(\0132\016.context.Event\022\"\n" + "\010slice_id\030\002 \001(\0132\020.context.SliceId\"6\n\014Con" + "nectionId\022&\n\017connection_uuid\030\001 \001(\0132\r.con" + "text.Uuid\"2\n\025ConnectionSettings_L0\022\031\n\021ls" + "p_symbolic_name\030\001 \001(\t\"\236\001\n\025ConnectionSett" + "ings_L2\022\027\n\017src_mac_address\030\001 \001(\t\022\027\n\017dst_" + "mac_address\030\002 \001(\t\022\022\n\nether_type\030\003 \001(\r\022\017\n" + "\007vlan_id\030\004 \001(\r\022\022\n\nmpls_label\030\005 \001(\r\022\032\n\022mp" + "ls_traffic_class\030\006 \001(\r\"t\n\025ConnectionSett" + "ings_L3\022\026\n\016src_ip_address\030\001 \001(\t\022\026\n\016dst_i" + "p_address\030\002 \001(\t\022\014\n\004dscp\030\003 \001(\r\022\020\n\010protoco" + "l\030\004 \001(\r\022\013\n\003ttl\030\005 \001(\r\"[\n\025ConnectionSettin" + "gs_L4\022\020\n\010src_port\030\001 \001(\r\022\020\n\010dst_port\030\002 \001(" + "\r\022\021\n\ttcp_flags\030\003 \001(\r\022\013\n\003ttl\030\004 \001(\r\"\304\001\n\022Co" + "nnectionSettings\022*\n\002l0\030\001 \001(\0132\036.context.C" + "onnectionSettings_L0\022*\n\002l2\030\002 \001(\0132\036.conte" + "xt.ConnectionSettings_L2\022*\n\002l3\030\003 \001(\0132\036.c" + "ontext.ConnectionSettings_L3\022*\n\002l4\030\004 \001(\013" + "2\036.context.ConnectionSettings_L4\"\363\001\n\nCon" + "nection\022,\n\rconnection_id\030\001 \001(\0132\025.context" + ".ConnectionId\022&\n\nservice_id\030\002 \001(\0132\022.cont" + "ext.ServiceId\0223\n\026path_hops_endpoint_ids\030" + "\003 \003(\0132\023.context.EndPointId\022+\n\017sub_servic" + "e_ids\030\004 \003(\0132\022.context.ServiceId\022-\n\010setti" + "ngs\030\005 \001(\0132\033.context.ConnectionSettings\"A" + "\n\020ConnectionIdList\022-\n\016connection_ids\030\001 \003" + "(\0132\025.context.ConnectionId\":\n\016ConnectionL" + "ist\022(\n\013connections\030\001 \003(\0132\023.context.Conne" + "ction\"^\n\017ConnectionEvent\022\035\n\005event\030\001 \001(\0132" + "\016.context.Event\022,\n\rconnection_id\030\002 \001(\0132\025" + ".context.ConnectionId\"\202\001\n\nEndPointId\022(\n\013" + "topology_id\030\001 \001(\0132\023.context.TopologyId\022$" + "\n\tdevice_id\030\002 \001(\0132\021.context.DeviceId\022$\n\r" + "endpoint_uuid\030\003 \001(\0132\r.context.Uuid\"\302\001\n\010E" + "ndPoint\022(\n\013endpoint_id\030\001 \001(\0132\023.context.E" + "ndPointId\022\014\n\004name\030\002 \001(\t\022\025\n\rendpoint_type" + "\030\003 \001(\t\0229\n\020kpi_sample_types\030\004 \003(\0162\037.kpi_s" + "ample_types.KpiSampleType\022,\n\021endpoint_lo" + "cation\030\005 \001(\0132\021.context.Location\"{\n\014EndPo" + "intName\022(\n\013endpoint_id\030\001 \001(\0132\023.context.E" + "ndPointId\022\023\n\013device_name\030\002 \001(\t\022\025\n\rendpoi" + "nt_name\030\003 \001(\t\022\025\n\rendpoint_type\030\004 \001(\t\";\n\016" + "EndPointIdList\022)\n\014endpoint_ids\030\001 \003(\0132\023.c" + "ontext.EndPointId\"A\n\020EndPointNameList\022-\n" + "\016endpoint_names\030\001 \003(\0132\025.context.EndPoint" + "Name\"A\n\021ConfigRule_Custom\022\024\n\014resource_ke" + "y\030\001 \001(\t\022\026\n\016resource_value\030\002 \001(\t\"]\n\016Confi" + "gRule_ACL\022(\n\013endpoint_id\030\001 \001(\0132\023.context" + ".EndPointId\022!\n\010rule_set\030\002 \001(\0132\017.acl.AclR" + "uleSet\"\234\001\n\nConfigRule\022)\n\006action\030\001 \001(\0162\031." + "context.ConfigActionEnum\022,\n\006custom\030\002 \001(\013" + "2\032.context.ConfigRule_CustomH\000\022&\n\003acl\030\003 " + "\001(\0132\027.context.ConfigRule_ACLH\000B\r\n\013config" + "_rule\"F\n\021Constraint_Custom\022\027\n\017constraint" + "_type\030\001 \001(\t\022\030\n\020constraint_value\030\002 \001(\t\"E\n" + "\023Constraint_Schedule\022\027\n\017start_timestamp\030" + "\001 \001(\001\022\025\n\rduration_days\030\002 \001(\002\"3\n\014GPS_Posi" + "tion\022\020\n\010latitude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001(" + "\002\"\204\001\n\010Location\022\020\n\006region\030\001 \001(\tH\000\022-\n\014gps_" + "position\030\002 \001(\0132\025.context.GPS_PositionH\000\022" + "\023\n\tinterface\030\003 \001(\tH\000\022\026\n\014circuit_pack\030\004 \001" + "(\tH\000B\n\n\010location\"l\n\033Constraint_EndPointL" + "ocation\022(\n\013endpoint_id\030\001 \001(\0132\023.context.E" + "ndPointId\022#\n\010location\030\002 \001(\0132\021.context.Lo" + "cation\"Y\n\033Constraint_EndPointPriority\022(\n" + "\013endpoint_id\030\001 \001(\0132\023.context.EndPointId\022" + "\020\n\010priority\030\002 \001(\r\"0\n\026Constraint_SLA_Late" + "ncy\022\026\n\016e2e_latency_ms\030\001 \001(\002\"0\n\027Constrain" + "t_SLA_Capacity\022\025\n\rcapacity_gbps\030\001 \001(\002\"c\n" + "\033Constraint_SLA_Availability\022\032\n\022num_disj" + "oint_paths\030\001 \001(\r\022\022\n\nall_active\030\002 \001(\010\022\024\n\014" + "availability\030\003 \001(\002\"V\n\036Constraint_SLA_Iso" + "lation_level\0224\n\017isolation_level\030\001 \003(\0162\033." + "context.IsolationLevelEnum\"\242\001\n\025Constrain" + "t_Exclusions\022\024\n\014is_permanent\030\001 \001(\010\022%\n\nde" + "vice_ids\030\002 \003(\0132\021.context.DeviceId\022)\n\014end" + "point_ids\030\003 \003(\0132\023.context.EndPointId\022!\n\010" + "link_ids\030\004 \003(\0132\017.context.LinkId\"5\n\014QoSPr" + "ofileId\022%\n\016qos_profile_id\030\001 \001(\0132\r.contex" + "t.Uuid\"`\n\025Constraint_QoSProfile\022-\n\016qos_p" + "rofile_id\030\001 \001(\0132\025.context.QoSProfileId\022\030" + "\n\020qos_profile_name\030\002 \001(\t\"\222\005\n\nConstraint\022" + "-\n\006action\030\001 \001(\0162\035.context.ConstraintActi" + "onEnum\022,\n\006custom\030\002 \001(\0132\032.context.Constra" + "int_CustomH\000\0220\n\010schedule\030\003 \001(\0132\034.context" + ".Constraint_ScheduleH\000\022A\n\021endpoint_locat" + "ion\030\004 \001(\0132$.context.Constraint_EndPointL" + "ocationH\000\022A\n\021endpoint_priority\030\005 \001(\0132$.c" + "ontext.Constraint_EndPointPriorityH\000\0228\n\014" + "sla_capacity\030\006 \001(\0132 .context.Constraint_" + "SLA_CapacityH\000\0226\n\013sla_latency\030\007 \001(\0132\037.co" + "ntext.Constraint_SLA_LatencyH\000\022@\n\020sla_av" + "ailability\030\010 \001(\0132$.context.Constraint_SL" + "A_AvailabilityH\000\022@\n\rsla_isolation\030\t \001(\0132" + "\'.context.Constraint_SLA_Isolation_level" + "H\000\0224\n\nexclusions\030\n \001(\0132\036.context.Constra" + "int_ExclusionsH\000\0225\n\013qos_profile\030\013 \001(\0132\036." + "context.Constraint_QoSProfileH\000B\014\n\nconst" + "raint\"^\n\022TeraFlowController\022&\n\ncontext_i" + "d\030\001 \001(\0132\022.context.ContextId\022\022\n\nip_addres" + "s\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n\024AuthenticationR" + "esult\022&\n\ncontext_id\030\001 \001(\0132\022.context.Cont" + "extId\022\025\n\rauthenticated\030\002 \001(\010\"-\n\017OpticalC" + "onfigId\022\032\n\022opticalconfig_uuid\030\001 \001(\t\"y\n\rO" + "pticalConfig\0222\n\020opticalconfig_id\030\001 \001(\0132\030" + ".context.OpticalConfigId\022\016\n\006config\030\002 \001(\t" + "\022$\n\tdevice_id\030\003 \001(\0132\021.context.DeviceId\"C" + "\n\021OpticalConfigList\022.\n\016opticalconfigs\030\001 " + "\003(\0132\026.context.OpticalConfig\"g\n\022OpticalCo" + "nfigEvent\022\035\n\005event\030\001 \001(\0132\016.context.Event" + "\0222\n\020opticalconfig_id\030\002 \001(\0132\030.context.Opt" + "icalConfigId\"_\n\021OpticalEndPointId\022$\n\tdev" + "ice_id\030\002 \001(\0132\021.context.DeviceId\022$\n\rendpo" + "int_uuid\030\003 \001(\0132\r.context.Uuid\">\n\017Optical" + "LinkList\022+\n\roptical_links\030\001 \003(\0132\024.contex" + "t.OpticalLink\"\304\003\n\022OpticalLinkDetails\022\016\n\006" + "length\030\001 \001(\002\022\020\n\010src_port\030\002 \001(\t\022\020\n\010dst_po" + "rt\030\003 \001(\t\022\027\n\017local_peer_port\030\004 \001(\t\022\030\n\020rem" + "ote_peer_port\030\005 \001(\t\022\014\n\004used\030\006 \001(\010\0228\n\007c_s" + "lots\030\007 \003(\0132\'.context.OpticalLinkDetails." + "CSlotsEntry\0228\n\007l_slots\030\010 \003(\0132\'.context.O" + "pticalLinkDetails.LSlotsEntry\0228\n\007s_slots" + "\030\t \003(\0132\'.context.OpticalLinkDetails.SSlo" + "tsEntry\032-\n\013CSlotsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + "alue\030\002 \001(\005:\0028\001\032-\n\013LSlotsEntry\022\013\n\003key\030\001 \001" + "(\t\022\r\n\005value\030\002 \001(\005:\0028\001\032-\n\013SSlotsEntry\022\013\n\003" + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\"\243\001\n\013Optical" + "Link\022\014\n\004name\030\001 \001(\t\0224\n\017optical_details\030\002 " + "\001(\0132\033.context.OpticalLinkDetails\022 \n\007link" + "_id\030\003 \001(\0132\017.context.LinkId\022.\n\021link_endpo" + "int_ids\030\004 \003(\0132\023.context.EndPointId\"r\n\021Se" + "rviceConfigRule\022&\n\nservice_id\030\001 \001(\0132\022.co" + "ntext.ServiceId\0225\n\021configrule_custom\030\002 \001" + "(\0132\032.context.ConfigRule_Custom*j\n\rEventT" + "ypeEnum\022\027\n\023EVENTTYPE_UNDEFINED\020\000\022\024\n\020EVEN" + "TTYPE_CREATE\020\001\022\024\n\020EVENTTYPE_UPDATE\020\002\022\024\n\020" + "EVENTTYPE_REMOVE\020\003*\316\003\n\020DeviceDriverEnum\022" + "\032\n\026DEVICEDRIVER_UNDEFINED\020\000\022\033\n\027DEVICEDRI" + "VER_OPENCONFIG\020\001\022\036\n\032DEVICEDRIVER_TRANSPO" + "RT_API\020\002\022\023\n\017DEVICEDRIVER_P4\020\003\022&\n\"DEVICED" + "RIVER_IETF_NETWORK_TOPOLOGY\020\004\022\033\n\027DEVICED" + "RIVER_ONF_TR_532\020\005\022\023\n\017DEVICEDRIVER_XR\020\006\022" + "\033\n\027DEVICEDRIVER_IETF_L2VPN\020\007\022 \n\034DEVICEDR" + "IVER_GNMI_OPENCONFIG\020\010\022\034\n\030DEVICEDRIVER_O" + "PTICAL_TFS\020\t\022\032\n\026DEVICEDRIVER_IETF_ACTN\020\n" + "\022\023\n\017DEVICEDRIVER_OC\020\013\022\024\n\020DEVICEDRIVER_QK" + "D\020\014\022\033\n\027DEVICEDRIVER_IETF_L3VPN\020\r\022\033\n\027DEVI" + "CEDRIVER_IETF_SLICE\020\016\022\024\n\020DEVICEDRIVER_NC" + "E\020\017*\217\001\n\033DeviceOperationalStatusEnum\022%\n!D" + "EVICEOPERATIONALSTATUS_UNDEFINED\020\000\022$\n DE" + "VICEOPERATIONALSTATUS_DISABLED\020\001\022#\n\037DEVI" + "CEOPERATIONALSTATUS_ENABLED\020\002*w\n\014LinkTyp" + "eEnum\022\024\n\020LINKTYPE_UNKNOWN\020\000\022\023\n\017LINKTYPE_" + "COPPER\020\001\022\022\n\016LINKTYPE_FIBER\020\002\022\022\n\016LINKTYPE" + "_RADIO\020\003\022\024\n\020LINKTYPE_VIRTUAL\020\004*\345\001\n\017Servi" + "ceTypeEnum\022\027\n\023SERVICETYPE_UNKNOWN\020\000\022\024\n\020S" + "ERVICETYPE_L3NM\020\001\022\024\n\020SERVICETYPE_L2NM\020\002\022" + ")\n%SERVICETYPE_TAPI_CONNECTIVITY_SERVICE" + "\020\003\022\022\n\016SERVICETYPE_TE\020\004\022\023\n\017SERVICETYPE_E2" + "E\020\005\022$\n SERVICETYPE_OPTICAL_CONNECTIVITY\020" + "\006\022\023\n\017SERVICETYPE_QKD\020\007*\304\001\n\021ServiceStatus" + "Enum\022\033\n\027SERVICESTATUS_UNDEFINED\020\000\022\031\n\025SER" + "VICESTATUS_PLANNED\020\001\022\030\n\024SERVICESTATUS_AC" + "TIVE\020\002\022\032\n\026SERVICESTATUS_UPDATING\020\003\022!\n\035SE" + "RVICESTATUS_PENDING_REMOVAL\020\004\022\036\n\032SERVICE" + "STATUS_SLA_VIOLATED\020\005*\251\001\n\017SliceStatusEnu" + "m\022\031\n\025SLICESTATUS_UNDEFINED\020\000\022\027\n\023SLICESTA" + "TUS_PLANNED\020\001\022\024\n\020SLICESTATUS_INIT\020\002\022\026\n\022S" + "LICESTATUS_ACTIVE\020\003\022\026\n\022SLICESTATUS_DEINI" + "T\020\004\022\034\n\030SLICESTATUS_SLA_VIOLATED\020\005*]\n\020Con" + "figActionEnum\022\032\n\026CONFIGACTION_UNDEFINED\020" + "\000\022\024\n\020CONFIGACTION_SET\020\001\022\027\n\023CONFIGACTION_" + "DELETE\020\002*m\n\024ConstraintActionEnum\022\036\n\032CONS" + "TRAINTACTION_UNDEFINED\020\000\022\030\n\024CONSTRAINTAC" + "TION_SET\020\001\022\033\n\027CONSTRAINTACTION_DELETE\020\002*" + "\203\002\n\022IsolationLevelEnum\022\020\n\014NO_ISOLATION\020\000" + "\022\026\n\022PHYSICAL_ISOLATION\020\001\022\025\n\021LOGICAL_ISOL" + "ATION\020\002\022\025\n\021PROCESS_ISOLATION\020\003\022\035\n\031PHYSIC" + "AL_MEMORY_ISOLATION\020\004\022\036\n\032PHYSICAL_NETWOR" + "K_ISOLATION\020\005\022\036\n\032VIRTUAL_RESOURCE_ISOLAT" + "ION\020\006\022\037\n\033NETWORK_FUNCTIONS_ISOLATION\020\007\022\025" + "\n\021SERVICE_ISOLATION\020\0102\202\034\n\016ContextService" + "\022:\n\016ListContextIds\022\016.context.Empty\032\026.con" + "text.ContextIdList\"\000\0226\n\014ListContexts\022\016.c" + "ontext.Empty\032\024.context.ContextList\"\000\0224\n\n" + "GetContext\022\022.context.ContextId\032\020.context" + ".Context\"\000\0224\n\nSetContext\022\020.context.Conte" + "xt\032\022.context.ContextId\"\000\0225\n\rRemoveContex" + "t\022\022.context.ContextId\032\016.context.Empty\"\000\022" + "=\n\020GetContextEvents\022\016.context.Empty\032\025.co" + "ntext.ContextEvent\"\0000\001\022@\n\017ListTopologyId" + "s\022\022.context.ContextId\032\027.context.Topology" + "IdList\"\000\022=\n\016ListTopologies\022\022.context.Con" + "textId\032\025.context.TopologyList\"\000\0227\n\013GetTo" + "pology\022\023.context.TopologyId\032\021.context.To" + "pology\"\000\022E\n\022GetTopologyDetails\022\023.context" + ".TopologyId\032\030.context.TopologyDetails\"\000\022" + "7\n\013SetTopology\022\021.context.Topology\032\023.cont" + "ext.TopologyId\"\000\0227\n\016RemoveTopology\022\023.con" + "text.TopologyId\032\016.context.Empty\"\000\022?\n\021Get" + "TopologyEvents\022\016.context.Empty\032\026.context" + ".TopologyEvent\"\0000\001\0228\n\rListDeviceIds\022\016.co" + "ntext.Empty\032\025.context.DeviceIdList\"\000\0224\n\013" + "ListDevices\022\016.context.Empty\032\023.context.De" + "viceList\"\000\0221\n\tGetDevice\022\021.context.Device" + "Id\032\017.context.Device\"\000\0221\n\tSetDevice\022\017.con" + "text.Device\032\021.context.DeviceId\"\000\0223\n\014Remo" + "veDevice\022\021.context.DeviceId\032\016.context.Em" + "pty\"\000\022;\n\017GetDeviceEvents\022\016.context.Empty" + "\032\024.context.DeviceEvent\"\0000\001\022<\n\014SelectDevi" + "ce\022\025.context.DeviceFilter\032\023.context.Devi" + "ceList\"\000\022I\n\021ListEndPointNames\022\027.context." + "EndPointIdList\032\031.context.EndPointNameLis" + "t\"\000\0224\n\013ListLinkIds\022\016.context.Empty\032\023.con" + "text.LinkIdList\"\000\0220\n\tListLinks\022\016.context" + ".Empty\032\021.context.LinkList\"\000\022+\n\007GetLink\022\017" + ".context.LinkId\032\r.context.Link\"\000\022+\n\007SetL" + "ink\022\r.context.Link\032\017.context.LinkId\"\000\022/\n" + "\nRemoveLink\022\017.context.LinkId\032\016.context.E" + "mpty\"\000\0227\n\rGetLinkEvents\022\016.context.Empty\032" + "\022.context.LinkEvent\"\0000\001\022>\n\016ListServiceId" + "s\022\022.context.ContextId\032\026.context.ServiceI" + "dList\"\000\022:\n\014ListServices\022\022.context.Contex" + "tId\032\024.context.ServiceList\"\000\0224\n\nGetServic" + "e\022\022.context.ServiceId\032\020.context.Service\"" + "\000\0224\n\nSetService\022\020.context.Service\032\022.cont" + "ext.ServiceId\"\000\0226\n\014UnsetService\022\020.contex" + "t.Service\032\022.context.ServiceId\"\000\0225\n\rRemov" + "eService\022\022.context.ServiceId\032\016.context.E" + "mpty\"\000\022=\n\020GetServiceEvents\022\016.context.Emp" + "ty\032\025.context.ServiceEvent\"\0000\001\022?\n\rSelectS" + "ervice\022\026.context.ServiceFilter\032\024.context" + ".ServiceList\"\000\022:\n\014ListSliceIds\022\022.context" + ".ContextId\032\024.context.SliceIdList\"\000\0226\n\nLi" + "stSlices\022\022.context.ContextId\032\022.context.S" + "liceList\"\000\022.\n\010GetSlice\022\020.context.SliceId" + "\032\016.context.Slice\"\000\022.\n\010SetSlice\022\016.context" + ".Slice\032\020.context.SliceId\"\000\0220\n\nUnsetSlice" + "\022\016.context.Slice\032\020.context.SliceId\"\000\0221\n\013" + "RemoveSlice\022\020.context.SliceId\032\016.context." + "Empty\"\000\0229\n\016GetSliceEvents\022\016.context.Empt" + "y\032\023.context.SliceEvent\"\0000\001\0229\n\013SelectSlic" + "e\022\024.context.SliceFilter\032\022.context.SliceL" + "ist\"\000\022D\n\021ListConnectionIds\022\022.context.Ser" + "viceId\032\031.context.ConnectionIdList\"\000\022@\n\017L" + "istConnections\022\022.context.ServiceId\032\027.con" + "text.ConnectionList\"\000\022=\n\rGetConnection\022\025" + ".context.ConnectionId\032\023.context.Connecti" + "on\"\000\022=\n\rSetConnection\022\023.context.Connecti" + "on\032\025.context.ConnectionId\"\000\022;\n\020RemoveCon" + "nection\022\025.context.ConnectionId\032\016.context" + ".Empty\"\000\022C\n\023GetConnectionEvents\022\016.contex" + "t.Empty\032\030.context.ConnectionEvent\"\0000\001\022@\n" + "\020GetOpticalConfig\022\016.context.Empty\032\032.cont" + "ext.OpticalConfigList\"\000\022F\n\020SetOpticalCon" + "fig\022\026.context.OpticalConfig\032\030.context.Op" + "ticalConfigId\"\000\022I\n\023UpdateOpticalConfig\022\026" + ".context.OpticalConfig\032\030.context.Optical" + "ConfigId\"\000\022I\n\023SelectOpticalConfig\022\030.cont" + "ext.OpticalConfigId\032\026.context.OpticalCon" + "fig\"\000\022A\n\023DeleteOpticalConfig\022\030.context.O" + "pticalConfigId\032\016.context.Empty\"\000\022@\n\024Dele" + "teOpticalChannel\022\026.context.OpticalConfig" + "\032\016.context.Empty\"\000\0228\n\016SetOpticalLink\022\024.c" + "ontext.OpticalLink\032\016.context.Empty\"\000\0229\n\016" + "GetOpticalLink\022\017.context.LinkId\032\024.contex" + "t.OpticalLink\"\000\0226\n\021DeleteOpticalLink\022\017.c" + "ontext.LinkId\032\016.context.Empty\"\000\022@\n\022GetOp" + "ticalLinkList\022\016.context.Empty\032\030.context." + "OpticalLinkList\"\000\022G\n\027DeleteServiceConfig" + "Rule\022\032.context.ServiceConfigRule\032\016.conte" + "xt.Empty\"\000b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { acl.Acl.getDescriptor(), kpi_sample_types.KpiSampleTypes.getDescriptor() }); internal_static_context_Empty_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_context_Empty_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Empty_descriptor, new java.lang.String[] {}); @@ -80858,7 +80880,7 @@ public final class ContextOuterClass { internal_static_context_LinkAttributes_descriptor = getDescriptor().getMessageTypes().get(24); internal_static_context_LinkAttributes_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkAttributes_descriptor, new java.lang.String[] { "TotalCapacityGbps", "UsedCapacityGbps" }); internal_static_context_Link_descriptor = getDescriptor().getMessageTypes().get(25); - internal_static_context_Link_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Link_descriptor, new java.lang.String[] { "LinkId", "Name", "LinkEndpointIds", "Attributes", "LinkType" }); + internal_static_context_Link_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Link_descriptor, new java.lang.String[] { "LinkId", "Name", "LinkType", "LinkEndpointIds", "Attributes" }); internal_static_context_LinkIdList_descriptor = getDescriptor().getMessageTypes().get(26); internal_static_context_LinkIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkIdList_descriptor, new java.lang.String[] { "LinkIds" }); internal_static_context_LinkList_descriptor = getDescriptor().getMessageTypes().get(27); diff --git a/src/policy/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java b/src/policy/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java index 9621efb4b..2a8a62593 100644 --- a/src/policy/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java +++ b/src/policy/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java @@ -95,6 +95,38 @@ public final class KpiSampleTypes { * KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; */ KPISAMPLETYPE_SERVICE_LATENCY_MS(701), + /** + *
+         * output KPIs
+         * 
+ * + * KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT = 1101; + */ + KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT(1101), + /** + * KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT = 1102; + */ + KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT(1102), + /** + * KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT = 1103; + */ + KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT(1103), + /** + * KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT = 1201; + */ + KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT(1201), + /** + * KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT = 1202; + */ + KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT(1202), + /** + * KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT = 1203; + */ + KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT(1203), + /** + * KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT = 1701; + */ + KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT(1701), UNRECOGNIZED(-1); /** @@ -190,6 +222,45 @@ public final class KpiSampleTypes { */ public static final int KPISAMPLETYPE_SERVICE_LATENCY_MS_VALUE = 701; + /** + *
+         * output KPIs
+         * 
+ * + * KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT = 1101; + */ + public static final int KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT_VALUE = 1101; + + /** + * KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT = 1102; + */ + public static final int KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT_VALUE = 1102; + + /** + * KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT = 1103; + */ + public static final int KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT_VALUE = 1103; + + /** + * KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT = 1201; + */ + public static final int KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT_VALUE = 1201; + + /** + * KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT = 1202; + */ + public static final int KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT_VALUE = 1202; + + /** + * KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT = 1203; + */ + public static final int KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT_VALUE = 1203; + + /** + * KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT = 1701; + */ + public static final int KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT_VALUE = 1701; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); @@ -247,6 +318,20 @@ public final class KpiSampleTypes { return KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO; case 701: return KPISAMPLETYPE_SERVICE_LATENCY_MS; + case 1101: + return KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT; + case 1102: + return KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT; + case 1103: + return KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT; + case 1201: + return KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT; + case 1202: + return KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT; + case 1203: + return KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT; + case 1701: + return KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT; default: return null; } @@ -304,7 +389,7 @@ public final class KpiSampleTypes { private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { "\n\026kpi_sample_types.proto\022\020kpi_sample_typ" + "es*\260\005\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + "KNOWN\020\000\022%\n!KPISAMPLETYPE_PACKETS_TRANSMI" + "TTED\020e\022\"\n\036KPISAMPLETYPE_PACKETS_RECEIVED" + "\020f\022!\n\035KPISAMPLETYPE_PACKETS_DROPPED\020g\022$\n" + "\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001\022!\n\034K" + "PISAMPLETYPE_BYTES_RECEIVED\020\312\001\022 \n\033KPISAM" + "PLETYPE_BYTES_DROPPED\020\313\001\022+\n&KPISAMPLETYP" + "E_LINK_TOTAL_CAPACITY_GBPS\020\255\002\022*\n%KPISAMP" + "LETYPE_LINK_USED_CAPACITY_GBPS\020\256\002\022 \n\033KPI" + "SAMPLETYPE_ML_CONFIDENCE\020\221\003\022*\n%KPISAMPLE" + "TYPE_OPTICAL_SECURITY_STATUS\020\365\003\022)\n$KPISA" + "MPLETYPE_L3_UNIQUE_ATTACK_CONNS\020\331\004\022*\n%KP" + "ISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS\020\332\004\022&" + "\n!KPISAMPLETYPE_L3_UNIQUE_ATTACKERS\020\333\004\0220" + "\n+KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CL" + "IENTS\020\334\004\022,\n\'KPISAMPLETYPE_L3_SECURITY_ST" + "ATUS_CRYPTO\020\335\004\022%\n KPISAMPLETYPE_SERVICE_" + "LATENCY_MS\020\275\005b\006proto3" }; + java.lang.String[] descriptorData = { "\n\026kpi_sample_types.proto\022\020kpi_sample_typ" + "es*\200\010\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + "KNOWN\020\000\022%\n!KPISAMPLETYPE_PACKETS_TRANSMI" + "TTED\020e\022\"\n\036KPISAMPLETYPE_PACKETS_RECEIVED" + "\020f\022!\n\035KPISAMPLETYPE_PACKETS_DROPPED\020g\022$\n" + "\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001\022!\n\034K" + "PISAMPLETYPE_BYTES_RECEIVED\020\312\001\022 \n\033KPISAM" + "PLETYPE_BYTES_DROPPED\020\313\001\022+\n&KPISAMPLETYP" + "E_LINK_TOTAL_CAPACITY_GBPS\020\255\002\022*\n%KPISAMP" + "LETYPE_LINK_USED_CAPACITY_GBPS\020\256\002\022 \n\033KPI" + "SAMPLETYPE_ML_CONFIDENCE\020\221\003\022*\n%KPISAMPLE" + "TYPE_OPTICAL_SECURITY_STATUS\020\365\003\022)\n$KPISA" + "MPLETYPE_L3_UNIQUE_ATTACK_CONNS\020\331\004\022*\n%KP" + "ISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS\020\332\004\022&" + "\n!KPISAMPLETYPE_L3_UNIQUE_ATTACKERS\020\333\004\0220" + "\n+KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CL" + "IENTS\020\334\004\022,\n\'KPISAMPLETYPE_L3_SECURITY_ST" + "ATUS_CRYPTO\020\335\004\022%\n KPISAMPLETYPE_SERVICE_" + "LATENCY_MS\020\275\005\0221\n,KPISAMPLETYPE_PACKETS_T" + "RANSMITTED_AGG_OUTPUT\020\315\010\022.\n)KPISAMPLETYP" + "E_PACKETS_RECEIVED_AGG_OUTPUT\020\316\010\022-\n(KPIS" + "AMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT\020\317\010\022" + "/\n*KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_O" + "UTPUT\020\261\t\022,\n\'KPISAMPLETYPE_BYTES_RECEIVED" + "_AGG_OUTPUT\020\262\t\022+\n&KPISAMPLETYPE_BYTES_DR" + "OPPED_AGG_OUTPUT\020\263\t\0220\n+KPISAMPLETYPE_SER" + "VICE_LATENCY_MS_AGG_OUTPUT\020\245\rb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); } // @@protoc_insertion_point(outer_class_scope) diff --git a/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java b/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java index 2a0b2683b..cfce9dad0 100644 --- a/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java @@ -200,9 +200,17 @@ public final class ContextOuterClass { */ DEVICEDRIVER_QKD(12), /** - * DEVICEDRIVER_PON = 13; + * DEVICEDRIVER_IETF_L3VPN = 13; */ - DEVICEDRIVER_PON(13), + DEVICEDRIVER_IETF_L3VPN(13), + /** + * DEVICEDRIVER_IETF_SLICE = 14; + */ + DEVICEDRIVER_IETF_SLICE(14), + /** + * DEVICEDRIVER_NCE = 15; + */ + DEVICEDRIVER_NCE(15), UNRECOGNIZED(-1); /** @@ -275,9 +283,19 @@ public final class ContextOuterClass { public static final int DEVICEDRIVER_QKD_VALUE = 12; /** - * DEVICEDRIVER_PON = 13; + * DEVICEDRIVER_IETF_L3VPN = 13; + */ + public static final int DEVICEDRIVER_IETF_L3VPN_VALUE = 13; + + /** + * DEVICEDRIVER_IETF_SLICE = 14; + */ + public static final int DEVICEDRIVER_IETF_SLICE_VALUE = 14; + + /** + * DEVICEDRIVER_NCE = 15; */ - public static final int DEVICEDRIVER_PON_VALUE = 13; + public static final int DEVICEDRIVER_NCE_VALUE = 15; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -329,7 +347,11 @@ public final class ContextOuterClass { case 12: return DEVICEDRIVER_QKD; case 13: - return DEVICEDRIVER_PON; + return DEVICEDRIVER_IETF_L3VPN; + case 14: + return DEVICEDRIVER_IETF_SLICE; + case 15: + return DEVICEDRIVER_NCE; default: return null; } @@ -507,17 +529,17 @@ public final class ContextOuterClass { */ LINKTYPE_COPPER(1), /** - * LINKTYPE_VIRTUAL_COPPER = 2; + * LINKTYPE_FIBER = 2; */ - LINKTYPE_VIRTUAL_COPPER(2), + LINKTYPE_FIBER(2), /** - * LINKTYPE_OPTICAL = 3; + * LINKTYPE_RADIO = 3; */ - LINKTYPE_OPTICAL(3), + LINKTYPE_RADIO(3), /** - * LINKTYPE_VIRTUAL_OPTICAL = 4; + * LINKTYPE_VIRTUAL = 4; */ - LINKTYPE_VIRTUAL_OPTICAL(4), + LINKTYPE_VIRTUAL(4), UNRECOGNIZED(-1); /** @@ -531,19 +553,19 @@ public final class ContextOuterClass { public static final int LINKTYPE_COPPER_VALUE = 1; /** - * LINKTYPE_VIRTUAL_COPPER = 2; + * LINKTYPE_FIBER = 2; */ - public static final int LINKTYPE_VIRTUAL_COPPER_VALUE = 2; + public static final int LINKTYPE_FIBER_VALUE = 2; /** - * LINKTYPE_OPTICAL = 3; + * LINKTYPE_RADIO = 3; */ - public static final int LINKTYPE_OPTICAL_VALUE = 3; + public static final int LINKTYPE_RADIO_VALUE = 3; /** - * LINKTYPE_VIRTUAL_OPTICAL = 4; + * LINKTYPE_VIRTUAL = 4; */ - public static final int LINKTYPE_VIRTUAL_OPTICAL_VALUE = 4; + public static final int LINKTYPE_VIRTUAL_VALUE = 4; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -573,11 +595,11 @@ public final class ContextOuterClass { case 1: return LINKTYPE_COPPER; case 2: - return LINKTYPE_VIRTUAL_COPPER; + return LINKTYPE_FIBER; case 3: - return LINKTYPE_OPTICAL; + return LINKTYPE_RADIO; case 4: - return LINKTYPE_VIRTUAL_OPTICAL; + return LINKTYPE_VIRTUAL; default: return null; } @@ -24099,58 +24121,58 @@ public final class ContextOuterClass { com.google.protobuf.ByteString getNameBytes(); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * .context.LinkTypeEnum link_type = 3; + * @return The enum numeric value on the wire for linkType. + */ + int getLinkTypeValue(); + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The linkType. + */ + context.ContextOuterClass.LinkTypeEnum getLinkType(); + + /** + * repeated .context.EndPointId link_endpoint_ids = 4; */ java.util.List getLinkEndpointIdsList(); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ context.ContextOuterClass.EndPointId getLinkEndpointIds(int index); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ int getLinkEndpointIdsCount(); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ java.util.List getLinkEndpointIdsOrBuilderList(); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index); /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return Whether the attributes field is set. */ boolean hasAttributes(); /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return The attributes. */ context.ContextOuterClass.LinkAttributes getAttributes(); /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder(); - - /** - * .context.LinkTypeEnum link_type = 5; - * @return The enum numeric value on the wire for linkType. - */ - int getLinkTypeValue(); - - /** - * .context.LinkTypeEnum link_type = 5; - * @return The linkType. - */ - context.ContextOuterClass.LinkTypeEnum getLinkType(); } /** @@ -24168,8 +24190,8 @@ public final class ContextOuterClass { private Link() { name_ = ""; - linkEndpointIds_ = java.util.Collections.emptyList(); linkType_ = 0; + linkEndpointIds_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -24255,13 +24277,36 @@ public final class ContextOuterClass { } } - public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 3; + public static final int LINK_TYPE_FIELD_NUMBER = 3; + + private int linkType_ = 0; + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The enum numeric value on the wire for linkType. + */ + @java.lang.Override + public int getLinkTypeValue() { + return linkType_; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The linkType. + */ + @java.lang.Override + public context.ContextOuterClass.LinkTypeEnum getLinkType() { + context.ContextOuterClass.LinkTypeEnum result = context.ContextOuterClass.LinkTypeEnum.forNumber(linkType_); + return result == null ? context.ContextOuterClass.LinkTypeEnum.UNRECOGNIZED : result; + } + + public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 4; @SuppressWarnings("serial") private java.util.List linkEndpointIds_; /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public java.util.List getLinkEndpointIdsList() { @@ -24269,7 +24314,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public java.util.List getLinkEndpointIdsOrBuilderList() { @@ -24277,7 +24322,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public int getLinkEndpointIdsCount() { @@ -24285,7 +24330,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { @@ -24293,19 +24338,19 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { return linkEndpointIds_.get(index); } - public static final int ATTRIBUTES_FIELD_NUMBER = 4; + public static final int ATTRIBUTES_FIELD_NUMBER = 5; private context.ContextOuterClass.LinkAttributes attributes_; /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return Whether the attributes field is set. */ @java.lang.Override @@ -24314,7 +24359,7 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return The attributes. */ @java.lang.Override @@ -24323,36 +24368,13 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ @java.lang.Override public context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder() { return attributes_ == null ? context.ContextOuterClass.LinkAttributes.getDefaultInstance() : attributes_; } - public static final int LINK_TYPE_FIELD_NUMBER = 5; - - private int linkType_ = 0; - - /** - * .context.LinkTypeEnum link_type = 5; - * @return The enum numeric value on the wire for linkType. - */ - @java.lang.Override - public int getLinkTypeValue() { - return linkType_; - } - - /** - * .context.LinkTypeEnum link_type = 5; - * @return The linkType. - */ - @java.lang.Override - public context.ContextOuterClass.LinkTypeEnum getLinkType() { - context.ContextOuterClass.LinkTypeEnum result = context.ContextOuterClass.LinkTypeEnum.forNumber(linkType_); - return result == null ? context.ContextOuterClass.LinkTypeEnum.UNRECOGNIZED : result; - } - private byte memoizedIsInitialized = -1; @java.lang.Override @@ -24374,14 +24396,14 @@ public final class ContextOuterClass { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } + if (linkType_ != context.ContextOuterClass.LinkTypeEnum.LINKTYPE_UNKNOWN.getNumber()) { + output.writeEnum(3, linkType_); + } for (int i = 0; i < linkEndpointIds_.size(); i++) { - output.writeMessage(3, linkEndpointIds_.get(i)); + output.writeMessage(4, linkEndpointIds_.get(i)); } if (attributes_ != null) { - output.writeMessage(4, getAttributes()); - } - if (linkType_ != context.ContextOuterClass.LinkTypeEnum.LINKTYPE_UNKNOWN.getNumber()) { - output.writeEnum(5, linkType_); + output.writeMessage(5, getAttributes()); } getUnknownFields().writeTo(output); } @@ -24398,14 +24420,14 @@ public final class ContextOuterClass { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } + if (linkType_ != context.ContextOuterClass.LinkTypeEnum.LINKTYPE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, linkType_); + } for (int i = 0; i < linkEndpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, linkEndpointIds_.get(i)); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkEndpointIds_.get(i)); } if (attributes_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAttributes()); - } - if (linkType_ != context.ContextOuterClass.LinkTypeEnum.LINKTYPE_UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, linkType_); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAttributes()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -24429,6 +24451,8 @@ public final class ContextOuterClass { } if (!getName().equals(other.getName())) return false; + if (linkType_ != other.linkType_) + return false; if (!getLinkEndpointIdsList().equals(other.getLinkEndpointIdsList())) return false; if (hasAttributes() != other.hasAttributes()) @@ -24437,8 +24461,6 @@ public final class ContextOuterClass { if (!getAttributes().equals(other.getAttributes())) return false; } - if (linkType_ != other.linkType_) - return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -24457,6 +24479,8 @@ public final class ContextOuterClass { } hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LINK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + linkType_; if (getLinkEndpointIdsCount() > 0) { hash = (37 * hash) + LINK_ENDPOINT_IDS_FIELD_NUMBER; hash = (53 * hash) + getLinkEndpointIdsList().hashCode(); @@ -24465,8 +24489,6 @@ public final class ContextOuterClass { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + getAttributes().hashCode(); } - hash = (37 * hash) + LINK_TYPE_FIELD_NUMBER; - hash = (53 * hash) + linkType_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -24577,19 +24599,19 @@ public final class ContextOuterClass { linkIdBuilder_ = null; } name_ = ""; + linkType_ = 0; if (linkEndpointIdsBuilder_ == null) { linkEndpointIds_ = java.util.Collections.emptyList(); } else { linkEndpointIds_ = null; linkEndpointIdsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); attributes_ = null; if (attributesBuilder_ != null) { attributesBuilder_.dispose(); attributesBuilder_ = null; } - linkType_ = 0; return this; } @@ -24625,9 +24647,9 @@ public final class ContextOuterClass { private void buildPartialRepeatedFields(context.ContextOuterClass.Link result) { if (linkEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { linkEndpointIds_ = java.util.Collections.unmodifiableList(linkEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } result.linkEndpointIds_ = linkEndpointIds_; } else { @@ -24643,11 +24665,11 @@ public final class ContextOuterClass { if (((from_bitField0_ & 0x00000002) != 0)) { result.name_ = name_; } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.attributes_ = attributesBuilder_ == null ? attributes_ : attributesBuilder_.build(); + if (((from_bitField0_ & 0x00000004) != 0)) { + result.linkType_ = linkType_; } if (((from_bitField0_ & 0x00000010) != 0)) { - result.linkType_ = linkType_; + result.attributes_ = attributesBuilder_ == null ? attributes_ : attributesBuilder_.build(); } } @@ -24672,11 +24694,14 @@ public final class ContextOuterClass { bitField0_ |= 0x00000002; onChanged(); } + if (other.linkType_ != 0) { + setLinkTypeValue(other.getLinkTypeValue()); + } if (linkEndpointIdsBuilder_ == null) { if (!other.linkEndpointIds_.isEmpty()) { if (linkEndpointIds_.isEmpty()) { linkEndpointIds_ = other.linkEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureLinkEndpointIdsIsMutable(); linkEndpointIds_.addAll(other.linkEndpointIds_); @@ -24689,7 +24714,7 @@ public final class ContextOuterClass { linkEndpointIdsBuilder_.dispose(); linkEndpointIdsBuilder_ = null; linkEndpointIds_ = other.linkEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); linkEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkEndpointIdsFieldBuilder() : null; } else { linkEndpointIdsBuilder_.addAllMessages(other.linkEndpointIds_); @@ -24699,9 +24724,6 @@ public final class ContextOuterClass { if (other.hasAttributes()) { mergeAttributes(other.getAttributes()); } - if (other.linkType_ != 0) { - setLinkTypeValue(other.getLinkTypeValue()); - } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -24739,7 +24761,14 @@ public final class ContextOuterClass { break; } // case 18 - case 26: + case 24: + { + linkType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + case 34: { context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); if (linkEndpointIdsBuilder_ == null) { @@ -24750,21 +24779,14 @@ public final class ContextOuterClass { } break; } - // case 26 - case 34: - { - input.readMessage(getAttributesFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: + case 42: { - linkType_ = input.readEnum(); + input.readMessage(getAttributesFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } - // case 40 + // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -24981,19 +25003,78 @@ public final class ContextOuterClass { return this; } + private int linkType_ = 0; + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The enum numeric value on the wire for linkType. + */ + @java.lang.Override + public int getLinkTypeValue() { + return linkType_; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @param value The enum numeric value on the wire for linkType to set. + * @return This builder for chaining. + */ + public Builder setLinkTypeValue(int value) { + linkType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The linkType. + */ + @java.lang.Override + public context.ContextOuterClass.LinkTypeEnum getLinkType() { + context.ContextOuterClass.LinkTypeEnum result = context.ContextOuterClass.LinkTypeEnum.forNumber(linkType_); + return result == null ? context.ContextOuterClass.LinkTypeEnum.UNRECOGNIZED : result; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @param value The linkType to set. + * @return This builder for chaining. + */ + public Builder setLinkType(context.ContextOuterClass.LinkTypeEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + linkType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @return This builder for chaining. + */ + public Builder clearLinkType() { + bitField0_ = (bitField0_ & ~0x00000004); + linkType_ = 0; + onChanged(); + return this; + } + private java.util.List linkEndpointIds_ = java.util.Collections.emptyList(); private void ensureLinkEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { linkEndpointIds_ = new java.util.ArrayList(linkEndpointIds_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3 linkEndpointIdsBuilder_; /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public java.util.List getLinkEndpointIdsList() { if (linkEndpointIdsBuilder_ == null) { @@ -25004,7 +25085,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public int getLinkEndpointIdsCount() { if (linkEndpointIdsBuilder_ == null) { @@ -25015,7 +25096,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { if (linkEndpointIdsBuilder_ == null) { @@ -25026,7 +25107,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { if (linkEndpointIdsBuilder_ == null) { @@ -25043,7 +25124,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { if (linkEndpointIdsBuilder_ == null) { @@ -25057,7 +25138,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId value) { if (linkEndpointIdsBuilder_ == null) { @@ -25074,7 +25155,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { if (linkEndpointIdsBuilder_ == null) { @@ -25091,7 +25172,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { if (linkEndpointIdsBuilder_ == null) { @@ -25105,7 +25186,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { if (linkEndpointIdsBuilder_ == null) { @@ -25119,7 +25200,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addAllLinkEndpointIds(java.lang.Iterable values) { if (linkEndpointIdsBuilder_ == null) { @@ -25133,12 +25214,12 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder clearLinkEndpointIds() { if (linkEndpointIdsBuilder_ == null) { linkEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { linkEndpointIdsBuilder_.clear(); @@ -25147,7 +25228,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder removeLinkEndpointIds(int index) { if (linkEndpointIdsBuilder_ == null) { @@ -25161,14 +25242,14 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointId.Builder getLinkEndpointIdsBuilder(int index) { return getLinkEndpointIdsFieldBuilder().getBuilder(index); } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { if (linkEndpointIdsBuilder_ == null) { @@ -25179,7 +25260,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public java.util.List getLinkEndpointIdsOrBuilderList() { if (linkEndpointIdsBuilder_ != null) { @@ -25190,21 +25271,21 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder() { return getLinkEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder(int index) { return getLinkEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public java.util.List getLinkEndpointIdsBuilderList() { return getLinkEndpointIdsFieldBuilder().getBuilderList(); @@ -25212,7 +25293,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3 getLinkEndpointIdsFieldBuilder() { if (linkEndpointIdsBuilder_ == null) { - linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkEndpointIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkEndpointIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); linkEndpointIds_ = null; } return linkEndpointIdsBuilder_; @@ -25223,15 +25304,15 @@ public final class ContextOuterClass { private com.google.protobuf.SingleFieldBuilderV3 attributesBuilder_; /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return Whether the attributes field is set. */ public boolean hasAttributes() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return The attributes. */ public context.ContextOuterClass.LinkAttributes getAttributes() { @@ -25243,7 +25324,7 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public Builder setAttributes(context.ContextOuterClass.LinkAttributes value) { if (attributesBuilder_ == null) { @@ -25254,13 +25335,13 @@ public final class ContextOuterClass { } else { attributesBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public Builder setAttributes(context.ContextOuterClass.LinkAttributes.Builder builderForValue) { if (attributesBuilder_ == null) { @@ -25268,17 +25349,17 @@ public final class ContextOuterClass { } else { attributesBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public Builder mergeAttributes(context.ContextOuterClass.LinkAttributes value) { if (attributesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && attributes_ != null && attributes_ != context.ContextOuterClass.LinkAttributes.getDefaultInstance()) { + if (((bitField0_ & 0x00000010) != 0) && attributes_ != null && attributes_ != context.ContextOuterClass.LinkAttributes.getDefaultInstance()) { getAttributesBuilder().mergeFrom(value); } else { attributes_ = value; @@ -25286,16 +25367,16 @@ public final class ContextOuterClass { } else { attributesBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public Builder clearAttributes() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); attributes_ = null; if (attributesBuilder_ != null) { attributesBuilder_.dispose(); @@ -25306,16 +25387,16 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public context.ContextOuterClass.LinkAttributes.Builder getAttributesBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getAttributesFieldBuilder().getBuilder(); } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder() { if (attributesBuilder_ != null) { @@ -25326,7 +25407,7 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ private com.google.protobuf.SingleFieldBuilderV3 getAttributesFieldBuilder() { if (attributesBuilder_ == null) { @@ -25336,65 +25417,6 @@ public final class ContextOuterClass { return attributesBuilder_; } - private int linkType_ = 0; - - /** - * .context.LinkTypeEnum link_type = 5; - * @return The enum numeric value on the wire for linkType. - */ - @java.lang.Override - public int getLinkTypeValue() { - return linkType_; - } - - /** - * .context.LinkTypeEnum link_type = 5; - * @param value The enum numeric value on the wire for linkType to set. - * @return This builder for chaining. - */ - public Builder setLinkTypeValue(int value) { - linkType_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * .context.LinkTypeEnum link_type = 5; - * @return The linkType. - */ - @java.lang.Override - public context.ContextOuterClass.LinkTypeEnum getLinkType() { - context.ContextOuterClass.LinkTypeEnum result = context.ContextOuterClass.LinkTypeEnum.forNumber(linkType_); - return result == null ? context.ContextOuterClass.LinkTypeEnum.UNRECOGNIZED : result; - } - - /** - * .context.LinkTypeEnum link_type = 5; - * @param value The linkType to set. - * @return This builder for chaining. - */ - public Builder setLinkType(context.ContextOuterClass.LinkTypeEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - linkType_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * .context.LinkTypeEnum link_type = 5; - * @return This builder for chaining. - */ - public Builder clearLinkType() { - bitField0_ = (bitField0_ & ~0x00000010); - linkType_ = 0; - onChanged(); - return this; - } - @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -80803,7 +80825,7 @@ public final class ContextOuterClass { private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { "\n\rcontext.proto\022\007context\032\tacl.proto\032\026kpi" + "_sample_types.proto\"\007\n\005Empty\"\024\n\004Uuid\022\014\n\004" + "uuid\030\001 \001(\t\"\036\n\tTimestamp\022\021\n\ttimestamp\030\001 \001" + "(\001\"Z\n\005Event\022%\n\ttimestamp\030\001 \001(\0132\022.context" + ".Timestamp\022*\n\nevent_type\030\002 \001(\0162\026.context" + ".EventTypeEnum\"0\n\tContextId\022#\n\014context_u" + "uid\030\001 \001(\0132\r.context.Uuid\"\351\001\n\007Context\022&\n\n" + "context_id\030\001 \001(\0132\022.context.ContextId\022\014\n\004" + "name\030\002 \001(\t\022)\n\014topology_ids\030\003 \003(\0132\023.conte" + "xt.TopologyId\022\'\n\013service_ids\030\004 \003(\0132\022.con" + "text.ServiceId\022#\n\tslice_ids\030\005 \003(\0132\020.cont" + "ext.SliceId\022/\n\ncontroller\030\006 \001(\0132\033.contex" + "t.TeraFlowController\"8\n\rContextIdList\022\'\n" + "\013context_ids\030\001 \003(\0132\022.context.ContextId\"1" + "\n\013ContextList\022\"\n\010contexts\030\001 \003(\0132\020.contex" + "t.Context\"U\n\014ContextEvent\022\035\n\005event\030\001 \001(\013" + "2\016.context.Event\022&\n\ncontext_id\030\002 \001(\0132\022.c" + "ontext.ContextId\"Z\n\nTopologyId\022&\n\ncontex" + "t_id\030\001 \001(\0132\022.context.ContextId\022$\n\rtopolo" + "gy_uuid\030\002 \001(\0132\r.context.Uuid\"\267\001\n\010Topolog" + "y\022(\n\013topology_id\030\001 \001(\0132\023.context.Topolog" + "yId\022\014\n\004name\030\002 \001(\t\022%\n\ndevice_ids\030\003 \003(\0132\021." + "context.DeviceId\022!\n\010link_ids\030\004 \003(\0132\017.con" + "text.LinkId\022)\n\020optical_link_ids\030\005 \003(\0132\017." + "context.LinkId\"\266\001\n\017TopologyDetails\022(\n\013to" + "pology_id\030\001 \001(\0132\023.context.TopologyId\022\014\n\004" + "name\030\002 \001(\t\022 \n\007devices\030\003 \003(\0132\017.context.De" + "vice\022\034\n\005links\030\004 \003(\0132\r.context.Link\022+\n\rop" + "tical_links\030\005 \003(\0132\024.context.OpticalLink\"" + ";\n\016TopologyIdList\022)\n\014topology_ids\030\001 \003(\0132" + "\023.context.TopologyId\"5\n\014TopologyList\022%\n\n" + "topologies\030\001 \003(\0132\021.context.Topology\"X\n\rT" + "opologyEvent\022\035\n\005event\030\001 \001(\0132\016.context.Ev" + "ent\022(\n\013topology_id\030\002 \001(\0132\023.context.Topol" + "ogyId\".\n\010DeviceId\022\"\n\013device_uuid\030\001 \001(\0132\r" + ".context.Uuid\"\372\002\n\006Device\022$\n\tdevice_id\030\001 " + "\001(\0132\021.context.DeviceId\022\014\n\004name\030\002 \001(\t\022\023\n\013" + "device_type\030\003 \001(\t\022,\n\rdevice_config\030\004 \001(\013" + "2\025.context.DeviceConfig\022G\n\031device_operat" + "ional_status\030\005 \001(\0162$.context.DeviceOpera" + "tionalStatusEnum\0221\n\016device_drivers\030\006 \003(\016" + "2\031.context.DeviceDriverEnum\022+\n\020device_en" + "dpoints\030\007 \003(\0132\021.context.EndPoint\022&\n\ncomp" + "onents\030\010 \003(\0132\022.context.Component\022(\n\rcont" + "roller_id\030\t \001(\0132\021.context.DeviceId\"\311\001\n\tC" + "omponent\022%\n\016component_uuid\030\001 \001(\0132\r.conte" + "xt.Uuid\022\014\n\004name\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\0226\n\na" + "ttributes\030\004 \003(\0132\".context.Component.Attr" + "ibutesEntry\022\016\n\006parent\030\005 \001(\t\0321\n\017Attribute" + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"9" + "\n\014DeviceConfig\022)\n\014config_rules\030\001 \003(\0132\023.c" + "ontext.ConfigRule\"5\n\014DeviceIdList\022%\n\ndev" + "ice_ids\030\001 \003(\0132\021.context.DeviceId\".\n\nDevi" + "ceList\022 \n\007devices\030\001 \003(\0132\017.context.Device" + "\"\216\001\n\014DeviceFilter\022)\n\ndevice_ids\030\001 \001(\0132\025." + "context.DeviceIdList\022\031\n\021include_endpoint" + "s\030\002 \001(\010\022\034\n\024include_config_rules\030\003 \001(\010\022\032\n" + "\022include_components\030\004 \001(\010\"\200\001\n\013DeviceEven" + "t\022\035\n\005event\030\001 \001(\0132\016.context.Event\022$\n\tdevi" + "ce_id\030\002 \001(\0132\021.context.DeviceId\022,\n\rdevice" + "_config\030\003 \001(\0132\025.context.DeviceConfig\"*\n\006" + "LinkId\022 \n\tlink_uuid\030\001 \001(\0132\r.context.Uuid" + "\"I\n\016LinkAttributes\022\033\n\023total_capacity_gbp" + "s\030\001 \001(\002\022\032\n\022used_capacity_gbps\030\002 \001(\002\"\275\001\n\004" + "Link\022 \n\007link_id\030\001 \001(\0132\017.context.LinkId\022\014" + "\n\004name\030\002 \001(\t\022.\n\021link_endpoint_ids\030\003 \003(\0132" + "\023.context.EndPointId\022+\n\nattributes\030\004 \001(\013" + "2\027.context.LinkAttributes\022(\n\tlink_type\030\005" + " \001(\0162\025.context.LinkTypeEnum\"/\n\nLinkIdLis" + "t\022!\n\010link_ids\030\001 \003(\0132\017.context.LinkId\"(\n\010" + "LinkList\022\034\n\005links\030\001 \003(\0132\r.context.Link\"L" + "\n\tLinkEvent\022\035\n\005event\030\001 \001(\0132\016.context.Eve" + "nt\022 \n\007link_id\030\002 \001(\0132\017.context.LinkId\"X\n\t" + "ServiceId\022&\n\ncontext_id\030\001 \001(\0132\022.context." + "ContextId\022#\n\014service_uuid\030\002 \001(\0132\r.contex" + "t.Uuid\"\333\002\n\007Service\022&\n\nservice_id\030\001 \001(\0132\022" + ".context.ServiceId\022\014\n\004name\030\002 \001(\t\022.\n\014serv" + "ice_type\030\003 \001(\0162\030.context.ServiceTypeEnum" + "\0221\n\024service_endpoint_ids\030\004 \003(\0132\023.context" + ".EndPointId\0220\n\023service_constraints\030\005 \003(\013" + "2\023.context.Constraint\022.\n\016service_status\030" + "\006 \001(\0132\026.context.ServiceStatus\022.\n\016service" + "_config\030\007 \001(\0132\026.context.ServiceConfig\022%\n" + "\ttimestamp\030\010 \001(\0132\022.context.Timestamp\"C\n\r" + "ServiceStatus\0222\n\016service_status\030\001 \001(\0162\032." + "context.ServiceStatusEnum\":\n\rServiceConf" + "ig\022)\n\014config_rules\030\001 \003(\0132\023.context.Confi" + "gRule\"8\n\rServiceIdList\022\'\n\013service_ids\030\001 " + "\003(\0132\022.context.ServiceId\"1\n\013ServiceList\022\"" + "\n\010services\030\001 \003(\0132\020.context.Service\"\225\001\n\rS" + "erviceFilter\022+\n\013service_ids\030\001 \001(\0132\026.cont" + "ext.ServiceIdList\022\034\n\024include_endpoint_id" + "s\030\002 \001(\010\022\033\n\023include_constraints\030\003 \001(\010\022\034\n\024" + "include_config_rules\030\004 \001(\010\"U\n\014ServiceEve" + "nt\022\035\n\005event\030\001 \001(\0132\016.context.Event\022&\n\nser" + "vice_id\030\002 \001(\0132\022.context.ServiceId\"T\n\007Sli" + "ceId\022&\n\ncontext_id\030\001 \001(\0132\022.context.Conte" + "xtId\022!\n\nslice_uuid\030\002 \001(\0132\r.context.Uuid\"" + "\240\003\n\005Slice\022\"\n\010slice_id\030\001 \001(\0132\020.context.Sl" + "iceId\022\014\n\004name\030\002 \001(\t\022/\n\022slice_endpoint_id" + "s\030\003 \003(\0132\023.context.EndPointId\022.\n\021slice_co" + "nstraints\030\004 \003(\0132\023.context.Constraint\022-\n\021" + "slice_service_ids\030\005 \003(\0132\022.context.Servic" + "eId\022,\n\022slice_subslice_ids\030\006 \003(\0132\020.contex" + "t.SliceId\022*\n\014slice_status\030\007 \001(\0132\024.contex" + "t.SliceStatus\022*\n\014slice_config\030\010 \001(\0132\024.co" + "ntext.SliceConfig\022(\n\013slice_owner\030\t \001(\0132\023" + ".context.SliceOwner\022%\n\ttimestamp\030\n \001(\0132\022" + ".context.Timestamp\"E\n\nSliceOwner\022!\n\nowne" + "r_uuid\030\001 \001(\0132\r.context.Uuid\022\024\n\014owner_str" + "ing\030\002 \001(\t\"=\n\013SliceStatus\022.\n\014slice_status" + "\030\001 \001(\0162\030.context.SliceStatusEnum\"8\n\013Slic" + "eConfig\022)\n\014config_rules\030\001 \003(\0132\023.context." + "ConfigRule\"2\n\013SliceIdList\022#\n\tslice_ids\030\001" + " \003(\0132\020.context.SliceId\"+\n\tSliceList\022\036\n\006s" + "lices\030\001 \003(\0132\016.context.Slice\"\312\001\n\013SliceFil" + "ter\022\'\n\tslice_ids\030\001 \001(\0132\024.context.SliceId" + "List\022\034\n\024include_endpoint_ids\030\002 \001(\010\022\033\n\023in" + "clude_constraints\030\003 \001(\010\022\033\n\023include_servi" + "ce_ids\030\004 \001(\010\022\034\n\024include_subslice_ids\030\005 \001" + "(\010\022\034\n\024include_config_rules\030\006 \001(\010\"O\n\nSlic" + "eEvent\022\035\n\005event\030\001 \001(\0132\016.context.Event\022\"\n" + "\010slice_id\030\002 \001(\0132\020.context.SliceId\"6\n\014Con" + "nectionId\022&\n\017connection_uuid\030\001 \001(\0132\r.con" + "text.Uuid\"2\n\025ConnectionSettings_L0\022\031\n\021ls" + "p_symbolic_name\030\001 \001(\t\"\236\001\n\025ConnectionSett" + "ings_L2\022\027\n\017src_mac_address\030\001 \001(\t\022\027\n\017dst_" + "mac_address\030\002 \001(\t\022\022\n\nether_type\030\003 \001(\r\022\017\n" + "\007vlan_id\030\004 \001(\r\022\022\n\nmpls_label\030\005 \001(\r\022\032\n\022mp" + "ls_traffic_class\030\006 \001(\r\"t\n\025ConnectionSett" + "ings_L3\022\026\n\016src_ip_address\030\001 \001(\t\022\026\n\016dst_i" + "p_address\030\002 \001(\t\022\014\n\004dscp\030\003 \001(\r\022\020\n\010protoco" + "l\030\004 \001(\r\022\013\n\003ttl\030\005 \001(\r\"[\n\025ConnectionSettin" + "gs_L4\022\020\n\010src_port\030\001 \001(\r\022\020\n\010dst_port\030\002 \001(" + "\r\022\021\n\ttcp_flags\030\003 \001(\r\022\013\n\003ttl\030\004 \001(\r\"\304\001\n\022Co" + "nnectionSettings\022*\n\002l0\030\001 \001(\0132\036.context.C" + "onnectionSettings_L0\022*\n\002l2\030\002 \001(\0132\036.conte" + "xt.ConnectionSettings_L2\022*\n\002l3\030\003 \001(\0132\036.c" + "ontext.ConnectionSettings_L3\022*\n\002l4\030\004 \001(\013" + "2\036.context.ConnectionSettings_L4\"\363\001\n\nCon" + "nection\022,\n\rconnection_id\030\001 \001(\0132\025.context" + ".ConnectionId\022&\n\nservice_id\030\002 \001(\0132\022.cont" + "ext.ServiceId\0223\n\026path_hops_endpoint_ids\030" + "\003 \003(\0132\023.context.EndPointId\022+\n\017sub_servic" + "e_ids\030\004 \003(\0132\022.context.ServiceId\022-\n\010setti" + "ngs\030\005 \001(\0132\033.context.ConnectionSettings\"A" + "\n\020ConnectionIdList\022-\n\016connection_ids\030\001 \003" + "(\0132\025.context.ConnectionId\":\n\016ConnectionL" + "ist\022(\n\013connections\030\001 \003(\0132\023.context.Conne" + "ction\"^\n\017ConnectionEvent\022\035\n\005event\030\001 \001(\0132" + "\016.context.Event\022,\n\rconnection_id\030\002 \001(\0132\025" + ".context.ConnectionId\"\202\001\n\nEndPointId\022(\n\013" + "topology_id\030\001 \001(\0132\023.context.TopologyId\022$" + "\n\tdevice_id\030\002 \001(\0132\021.context.DeviceId\022$\n\r" + "endpoint_uuid\030\003 \001(\0132\r.context.Uuid\"\302\001\n\010E" + "ndPoint\022(\n\013endpoint_id\030\001 \001(\0132\023.context.E" + "ndPointId\022\014\n\004name\030\002 \001(\t\022\025\n\rendpoint_type" + "\030\003 \001(\t\0229\n\020kpi_sample_types\030\004 \003(\0162\037.kpi_s" + "ample_types.KpiSampleType\022,\n\021endpoint_lo" + "cation\030\005 \001(\0132\021.context.Location\"{\n\014EndPo" + "intName\022(\n\013endpoint_id\030\001 \001(\0132\023.context.E" + "ndPointId\022\023\n\013device_name\030\002 \001(\t\022\025\n\rendpoi" + "nt_name\030\003 \001(\t\022\025\n\rendpoint_type\030\004 \001(\t\";\n\016" + "EndPointIdList\022)\n\014endpoint_ids\030\001 \003(\0132\023.c" + "ontext.EndPointId\"A\n\020EndPointNameList\022-\n" + "\016endpoint_names\030\001 \003(\0132\025.context.EndPoint" + "Name\"A\n\021ConfigRule_Custom\022\024\n\014resource_ke" + "y\030\001 \001(\t\022\026\n\016resource_value\030\002 \001(\t\"]\n\016Confi" + "gRule_ACL\022(\n\013endpoint_id\030\001 \001(\0132\023.context" + ".EndPointId\022!\n\010rule_set\030\002 \001(\0132\017.acl.AclR" + "uleSet\"\234\001\n\nConfigRule\022)\n\006action\030\001 \001(\0162\031." + "context.ConfigActionEnum\022,\n\006custom\030\002 \001(\013" + "2\032.context.ConfigRule_CustomH\000\022&\n\003acl\030\003 " + "\001(\0132\027.context.ConfigRule_ACLH\000B\r\n\013config" + "_rule\"F\n\021Constraint_Custom\022\027\n\017constraint" + "_type\030\001 \001(\t\022\030\n\020constraint_value\030\002 \001(\t\"E\n" + "\023Constraint_Schedule\022\027\n\017start_timestamp\030" + "\001 \001(\001\022\025\n\rduration_days\030\002 \001(\002\"3\n\014GPS_Posi" + "tion\022\020\n\010latitude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001(" + "\002\"\204\001\n\010Location\022\020\n\006region\030\001 \001(\tH\000\022-\n\014gps_" + "position\030\002 \001(\0132\025.context.GPS_PositionH\000\022" + "\023\n\tinterface\030\003 \001(\tH\000\022\026\n\014circuit_pack\030\004 \001" + "(\tH\000B\n\n\010location\"l\n\033Constraint_EndPointL" + "ocation\022(\n\013endpoint_id\030\001 \001(\0132\023.context.E" + "ndPointId\022#\n\010location\030\002 \001(\0132\021.context.Lo" + "cation\"Y\n\033Constraint_EndPointPriority\022(\n" + "\013endpoint_id\030\001 \001(\0132\023.context.EndPointId\022" + "\020\n\010priority\030\002 \001(\r\"0\n\026Constraint_SLA_Late" + "ncy\022\026\n\016e2e_latency_ms\030\001 \001(\002\"0\n\027Constrain" + "t_SLA_Capacity\022\025\n\rcapacity_gbps\030\001 \001(\002\"c\n" + "\033Constraint_SLA_Availability\022\032\n\022num_disj" + "oint_paths\030\001 \001(\r\022\022\n\nall_active\030\002 \001(\010\022\024\n\014" + "availability\030\003 \001(\002\"V\n\036Constraint_SLA_Iso" + "lation_level\0224\n\017isolation_level\030\001 \003(\0162\033." + "context.IsolationLevelEnum\"\242\001\n\025Constrain" + "t_Exclusions\022\024\n\014is_permanent\030\001 \001(\010\022%\n\nde" + "vice_ids\030\002 \003(\0132\021.context.DeviceId\022)\n\014end" + "point_ids\030\003 \003(\0132\023.context.EndPointId\022!\n\010" + "link_ids\030\004 \003(\0132\017.context.LinkId\"5\n\014QoSPr" + "ofileId\022%\n\016qos_profile_id\030\001 \001(\0132\r.contex" + "t.Uuid\"`\n\025Constraint_QoSProfile\022-\n\016qos_p" + "rofile_id\030\001 \001(\0132\025.context.QoSProfileId\022\030" + "\n\020qos_profile_name\030\002 \001(\t\"\222\005\n\nConstraint\022" + "-\n\006action\030\001 \001(\0162\035.context.ConstraintActi" + "onEnum\022,\n\006custom\030\002 \001(\0132\032.context.Constra" + "int_CustomH\000\0220\n\010schedule\030\003 \001(\0132\034.context" + ".Constraint_ScheduleH\000\022A\n\021endpoint_locat" + "ion\030\004 \001(\0132$.context.Constraint_EndPointL" + "ocationH\000\022A\n\021endpoint_priority\030\005 \001(\0132$.c" + "ontext.Constraint_EndPointPriorityH\000\0228\n\014" + "sla_capacity\030\006 \001(\0132 .context.Constraint_" + "SLA_CapacityH\000\0226\n\013sla_latency\030\007 \001(\0132\037.co" + "ntext.Constraint_SLA_LatencyH\000\022@\n\020sla_av" + "ailability\030\010 \001(\0132$.context.Constraint_SL" + "A_AvailabilityH\000\022@\n\rsla_isolation\030\t \001(\0132" + "\'.context.Constraint_SLA_Isolation_level" + "H\000\0224\n\nexclusions\030\n \001(\0132\036.context.Constra" + "int_ExclusionsH\000\0225\n\013qos_profile\030\013 \001(\0132\036." + "context.Constraint_QoSProfileH\000B\014\n\nconst" + "raint\"^\n\022TeraFlowController\022&\n\ncontext_i" + "d\030\001 \001(\0132\022.context.ContextId\022\022\n\nip_addres" + "s\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n\024AuthenticationR" + "esult\022&\n\ncontext_id\030\001 \001(\0132\022.context.Cont" + "extId\022\025\n\rauthenticated\030\002 \001(\010\"-\n\017OpticalC" + "onfigId\022\032\n\022opticalconfig_uuid\030\001 \001(\t\"y\n\rO" + "pticalConfig\0222\n\020opticalconfig_id\030\001 \001(\0132\030" + ".context.OpticalConfigId\022\016\n\006config\030\002 \001(\t" + "\022$\n\tdevice_id\030\003 \001(\0132\021.context.DeviceId\"C" + "\n\021OpticalConfigList\022.\n\016opticalconfigs\030\001 " + "\003(\0132\026.context.OpticalConfig\"g\n\022OpticalCo" + "nfigEvent\022\035\n\005event\030\001 \001(\0132\016.context.Event" + "\0222\n\020opticalconfig_id\030\002 \001(\0132\030.context.Opt" + "icalConfigId\"_\n\021OpticalEndPointId\022$\n\tdev" + "ice_id\030\002 \001(\0132\021.context.DeviceId\022$\n\rendpo" + "int_uuid\030\003 \001(\0132\r.context.Uuid\">\n\017Optical" + "LinkList\022+\n\roptical_links\030\001 \003(\0132\024.contex" + "t.OpticalLink\"\304\003\n\022OpticalLinkDetails\022\016\n\006" + "length\030\001 \001(\002\022\020\n\010src_port\030\002 \001(\t\022\020\n\010dst_po" + "rt\030\003 \001(\t\022\027\n\017local_peer_port\030\004 \001(\t\022\030\n\020rem" + "ote_peer_port\030\005 \001(\t\022\014\n\004used\030\006 \001(\010\0228\n\007c_s" + "lots\030\007 \003(\0132\'.context.OpticalLinkDetails." + "CSlotsEntry\0228\n\007l_slots\030\010 \003(\0132\'.context.O" + "pticalLinkDetails.LSlotsEntry\0228\n\007s_slots" + "\030\t \003(\0132\'.context.OpticalLinkDetails.SSlo" + "tsEntry\032-\n\013CSlotsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + "alue\030\002 \001(\005:\0028\001\032-\n\013LSlotsEntry\022\013\n\003key\030\001 \001" + "(\t\022\r\n\005value\030\002 \001(\005:\0028\001\032-\n\013SSlotsEntry\022\013\n\003" + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\"\243\001\n\013Optical" + "Link\022\014\n\004name\030\001 \001(\t\0224\n\017optical_details\030\002 " + "\001(\0132\033.context.OpticalLinkDetails\022 \n\007link" + "_id\030\003 \001(\0132\017.context.LinkId\022.\n\021link_endpo" + "int_ids\030\004 \003(\0132\023.context.EndPointId\"r\n\021Se" + "rviceConfigRule\022&\n\nservice_id\030\001 \001(\0132\022.co" + "ntext.ServiceId\0225\n\021configrule_custom\030\002 \001" + "(\0132\032.context.ConfigRule_Custom*j\n\rEventT" + "ypeEnum\022\027\n\023EVENTTYPE_UNDEFINED\020\000\022\024\n\020EVEN" + "TTYPE_CREATE\020\001\022\024\n\020EVENTTYPE_UPDATE\020\002\022\024\n\020" + "EVENTTYPE_REMOVE\020\003*\224\003\n\020DeviceDriverEnum\022" + "\032\n\026DEVICEDRIVER_UNDEFINED\020\000\022\033\n\027DEVICEDRI" + "VER_OPENCONFIG\020\001\022\036\n\032DEVICEDRIVER_TRANSPO" + "RT_API\020\002\022\023\n\017DEVICEDRIVER_P4\020\003\022&\n\"DEVICED" + "RIVER_IETF_NETWORK_TOPOLOGY\020\004\022\033\n\027DEVICED" + "RIVER_ONF_TR_532\020\005\022\023\n\017DEVICEDRIVER_XR\020\006\022" + "\033\n\027DEVICEDRIVER_IETF_L2VPN\020\007\022 \n\034DEVICEDR" + "IVER_GNMI_OPENCONFIG\020\010\022\034\n\030DEVICEDRIVER_O" + "PTICAL_TFS\020\t\022\032\n\026DEVICEDRIVER_IETF_ACTN\020\n" + "\022\023\n\017DEVICEDRIVER_OC\020\013\022\024\n\020DEVICEDRIVER_QK" + "D\020\014\022\024\n\020DEVICEDRIVER_PON\020\r*\217\001\n\033DeviceOper" + "ationalStatusEnum\022%\n!DEVICEOPERATIONALST" + "ATUS_UNDEFINED\020\000\022$\n DEVICEOPERATIONALSTA" + "TUS_DISABLED\020\001\022#\n\037DEVICEOPERATIONALSTATU" + "S_ENABLED\020\002*\212\001\n\014LinkTypeEnum\022\024\n\020LINKTYPE" + "_UNKNOWN\020\000\022\023\n\017LINKTYPE_COPPER\020\001\022\033\n\027LINKT" + "YPE_VIRTUAL_COPPER\020\002\022\024\n\020LINKTYPE_OPTICAL" + "\020\003\022\034\n\030LINKTYPE_VIRTUAL_OPTICAL\020\004*\345\001\n\017Ser" + "viceTypeEnum\022\027\n\023SERVICETYPE_UNKNOWN\020\000\022\024\n" + "\020SERVICETYPE_L3NM\020\001\022\024\n\020SERVICETYPE_L2NM\020" + "\002\022)\n%SERVICETYPE_TAPI_CONNECTIVITY_SERVI" + "CE\020\003\022\022\n\016SERVICETYPE_TE\020\004\022\023\n\017SERVICETYPE_" + "E2E\020\005\022$\n SERVICETYPE_OPTICAL_CONNECTIVIT" + "Y\020\006\022\023\n\017SERVICETYPE_QKD\020\007*\304\001\n\021ServiceStat" + "usEnum\022\033\n\027SERVICESTATUS_UNDEFINED\020\000\022\031\n\025S" + "ERVICESTATUS_PLANNED\020\001\022\030\n\024SERVICESTATUS_" + "ACTIVE\020\002\022\032\n\026SERVICESTATUS_UPDATING\020\003\022!\n\035" + "SERVICESTATUS_PENDING_REMOVAL\020\004\022\036\n\032SERVI" + "CESTATUS_SLA_VIOLATED\020\005*\251\001\n\017SliceStatusE" + "num\022\031\n\025SLICESTATUS_UNDEFINED\020\000\022\027\n\023SLICES" + "TATUS_PLANNED\020\001\022\024\n\020SLICESTATUS_INIT\020\002\022\026\n" + "\022SLICESTATUS_ACTIVE\020\003\022\026\n\022SLICESTATUS_DEI" + "NIT\020\004\022\034\n\030SLICESTATUS_SLA_VIOLATED\020\005*]\n\020C" + "onfigActionEnum\022\032\n\026CONFIGACTION_UNDEFINE" + "D\020\000\022\024\n\020CONFIGACTION_SET\020\001\022\027\n\023CONFIGACTIO" + "N_DELETE\020\002*m\n\024ConstraintActionEnum\022\036\n\032CO" + "NSTRAINTACTION_UNDEFINED\020\000\022\030\n\024CONSTRAINT" + "ACTION_SET\020\001\022\033\n\027CONSTRAINTACTION_DELETE\020" + "\002*\203\002\n\022IsolationLevelEnum\022\020\n\014NO_ISOLATION" + "\020\000\022\026\n\022PHYSICAL_ISOLATION\020\001\022\025\n\021LOGICAL_IS" + "OLATION\020\002\022\025\n\021PROCESS_ISOLATION\020\003\022\035\n\031PHYS" + "ICAL_MEMORY_ISOLATION\020\004\022\036\n\032PHYSICAL_NETW" + "ORK_ISOLATION\020\005\022\036\n\032VIRTUAL_RESOURCE_ISOL" + "ATION\020\006\022\037\n\033NETWORK_FUNCTIONS_ISOLATION\020\007" + "\022\025\n\021SERVICE_ISOLATION\020\0102\202\034\n\016ContextServi" + "ce\022:\n\016ListContextIds\022\016.context.Empty\032\026.c" + "ontext.ContextIdList\"\000\0226\n\014ListContexts\022\016" + ".context.Empty\032\024.context.ContextList\"\000\0224" + "\n\nGetContext\022\022.context.ContextId\032\020.conte" + "xt.Context\"\000\0224\n\nSetContext\022\020.context.Con" + "text\032\022.context.ContextId\"\000\0225\n\rRemoveCont" + "ext\022\022.context.ContextId\032\016.context.Empty\"" + "\000\022=\n\020GetContextEvents\022\016.context.Empty\032\025." + "context.ContextEvent\"\0000\001\022@\n\017ListTopology" + "Ids\022\022.context.ContextId\032\027.context.Topolo" + "gyIdList\"\000\022=\n\016ListTopologies\022\022.context.C" + "ontextId\032\025.context.TopologyList\"\000\0227\n\013Get" + "Topology\022\023.context.TopologyId\032\021.context." + "Topology\"\000\022E\n\022GetTopologyDetails\022\023.conte" + "xt.TopologyId\032\030.context.TopologyDetails\"" + "\000\0227\n\013SetTopology\022\021.context.Topology\032\023.co" + "ntext.TopologyId\"\000\0227\n\016RemoveTopology\022\023.c" + "ontext.TopologyId\032\016.context.Empty\"\000\022?\n\021G" + "etTopologyEvents\022\016.context.Empty\032\026.conte" + "xt.TopologyEvent\"\0000\001\0228\n\rListDeviceIds\022\016." + "context.Empty\032\025.context.DeviceIdList\"\000\0224" + "\n\013ListDevices\022\016.context.Empty\032\023.context." + "DeviceList\"\000\0221\n\tGetDevice\022\021.context.Devi" + "ceId\032\017.context.Device\"\000\0221\n\tSetDevice\022\017.c" + "ontext.Device\032\021.context.DeviceId\"\000\0223\n\014Re" + "moveDevice\022\021.context.DeviceId\032\016.context." + "Empty\"\000\022;\n\017GetDeviceEvents\022\016.context.Emp" + "ty\032\024.context.DeviceEvent\"\0000\001\022<\n\014SelectDe" + "vice\022\025.context.DeviceFilter\032\023.context.De" + "viceList\"\000\022I\n\021ListEndPointNames\022\027.contex" + "t.EndPointIdList\032\031.context.EndPointNameL" + "ist\"\000\0224\n\013ListLinkIds\022\016.context.Empty\032\023.c" + "ontext.LinkIdList\"\000\0220\n\tListLinks\022\016.conte" + "xt.Empty\032\021.context.LinkList\"\000\022+\n\007GetLink" + "\022\017.context.LinkId\032\r.context.Link\"\000\022+\n\007Se" + "tLink\022\r.context.Link\032\017.context.LinkId\"\000\022" + "/\n\nRemoveLink\022\017.context.LinkId\032\016.context" + ".Empty\"\000\0227\n\rGetLinkEvents\022\016.context.Empt" + "y\032\022.context.LinkEvent\"\0000\001\022>\n\016ListService" + "Ids\022\022.context.ContextId\032\026.context.Servic" + "eIdList\"\000\022:\n\014ListServices\022\022.context.Cont" + "extId\032\024.context.ServiceList\"\000\0224\n\nGetServ" + "ice\022\022.context.ServiceId\032\020.context.Servic" + "e\"\000\0224\n\nSetService\022\020.context.Service\032\022.co" + "ntext.ServiceId\"\000\0226\n\014UnsetService\022\020.cont" + "ext.Service\032\022.context.ServiceId\"\000\0225\n\rRem" + "oveService\022\022.context.ServiceId\032\016.context" + ".Empty\"\000\022=\n\020GetServiceEvents\022\016.context.E" + "mpty\032\025.context.ServiceEvent\"\0000\001\022?\n\rSelec" + "tService\022\026.context.ServiceFilter\032\024.conte" + "xt.ServiceList\"\000\022:\n\014ListSliceIds\022\022.conte" + "xt.ContextId\032\024.context.SliceIdList\"\000\0226\n\n" + "ListSlices\022\022.context.ContextId\032\022.context" + ".SliceList\"\000\022.\n\010GetSlice\022\020.context.Slice" + "Id\032\016.context.Slice\"\000\022.\n\010SetSlice\022\016.conte" + "xt.Slice\032\020.context.SliceId\"\000\0220\n\nUnsetSli" + "ce\022\016.context.Slice\032\020.context.SliceId\"\000\0221" + "\n\013RemoveSlice\022\020.context.SliceId\032\016.contex" + "t.Empty\"\000\0229\n\016GetSliceEvents\022\016.context.Em" + "pty\032\023.context.SliceEvent\"\0000\001\0229\n\013SelectSl" + "ice\022\024.context.SliceFilter\032\022.context.Slic" + "eList\"\000\022D\n\021ListConnectionIds\022\022.context.S" + "erviceId\032\031.context.ConnectionIdList\"\000\022@\n" + "\017ListConnections\022\022.context.ServiceId\032\027.c" + "ontext.ConnectionList\"\000\022=\n\rGetConnection" + "\022\025.context.ConnectionId\032\023.context.Connec" + "tion\"\000\022=\n\rSetConnection\022\023.context.Connec" + "tion\032\025.context.ConnectionId\"\000\022;\n\020RemoveC" + "onnection\022\025.context.ConnectionId\032\016.conte" + "xt.Empty\"\000\022C\n\023GetConnectionEvents\022\016.cont" + "ext.Empty\032\030.context.ConnectionEvent\"\0000\001\022" + "@\n\020GetOpticalConfig\022\016.context.Empty\032\032.co" + "ntext.OpticalConfigList\"\000\022F\n\020SetOpticalC" + "onfig\022\026.context.OpticalConfig\032\030.context." + "OpticalConfigId\"\000\022I\n\023UpdateOpticalConfig" + "\022\026.context.OpticalConfig\032\030.context.Optic" + "alConfigId\"\000\022I\n\023SelectOpticalConfig\022\030.co" + "ntext.OpticalConfigId\032\026.context.OpticalC" + "onfig\"\000\022A\n\023DeleteOpticalConfig\022\030.context" + ".OpticalConfigId\032\016.context.Empty\"\000\022@\n\024De" + "leteOpticalChannel\022\026.context.OpticalConf" + "ig\032\016.context.Empty\"\000\0228\n\016SetOpticalLink\022\024" + ".context.OpticalLink\032\016.context.Empty\"\000\0229" + "\n\016GetOpticalLink\022\017.context.LinkId\032\024.cont" + "ext.OpticalLink\"\000\0226\n\021DeleteOpticalLink\022\017" + ".context.LinkId\032\016.context.Empty\"\000\022@\n\022Get" + "OpticalLinkList\022\016.context.Empty\032\030.contex" + "t.OpticalLinkList\"\000\022G\n\027DeleteServiceConf" + "igRule\022\032.context.ServiceConfigRule\032\016.con" + "text.Empty\"\000b\006proto3" }; + java.lang.String[] descriptorData = { "\n\rcontext.proto\022\007context\032\tacl.proto\032\026kpi" + "_sample_types.proto\"\007\n\005Empty\"\024\n\004Uuid\022\014\n\004" + "uuid\030\001 \001(\t\"\036\n\tTimestamp\022\021\n\ttimestamp\030\001 \001" + "(\001\"Z\n\005Event\022%\n\ttimestamp\030\001 \001(\0132\022.context" + ".Timestamp\022*\n\nevent_type\030\002 \001(\0162\026.context" + ".EventTypeEnum\"0\n\tContextId\022#\n\014context_u" + "uid\030\001 \001(\0132\r.context.Uuid\"\351\001\n\007Context\022&\n\n" + "context_id\030\001 \001(\0132\022.context.ContextId\022\014\n\004" + "name\030\002 \001(\t\022)\n\014topology_ids\030\003 \003(\0132\023.conte" + "xt.TopologyId\022\'\n\013service_ids\030\004 \003(\0132\022.con" + "text.ServiceId\022#\n\tslice_ids\030\005 \003(\0132\020.cont" + "ext.SliceId\022/\n\ncontroller\030\006 \001(\0132\033.contex" + "t.TeraFlowController\"8\n\rContextIdList\022\'\n" + "\013context_ids\030\001 \003(\0132\022.context.ContextId\"1" + "\n\013ContextList\022\"\n\010contexts\030\001 \003(\0132\020.contex" + "t.Context\"U\n\014ContextEvent\022\035\n\005event\030\001 \001(\013" + "2\016.context.Event\022&\n\ncontext_id\030\002 \001(\0132\022.c" + "ontext.ContextId\"Z\n\nTopologyId\022&\n\ncontex" + "t_id\030\001 \001(\0132\022.context.ContextId\022$\n\rtopolo" + "gy_uuid\030\002 \001(\0132\r.context.Uuid\"\267\001\n\010Topolog" + "y\022(\n\013topology_id\030\001 \001(\0132\023.context.Topolog" + "yId\022\014\n\004name\030\002 \001(\t\022%\n\ndevice_ids\030\003 \003(\0132\021." + "context.DeviceId\022!\n\010link_ids\030\004 \003(\0132\017.con" + "text.LinkId\022)\n\020optical_link_ids\030\005 \003(\0132\017." + "context.LinkId\"\266\001\n\017TopologyDetails\022(\n\013to" + "pology_id\030\001 \001(\0132\023.context.TopologyId\022\014\n\004" + "name\030\002 \001(\t\022 \n\007devices\030\003 \003(\0132\017.context.De" + "vice\022\034\n\005links\030\004 \003(\0132\r.context.Link\022+\n\rop" + "tical_links\030\005 \003(\0132\024.context.OpticalLink\"" + ";\n\016TopologyIdList\022)\n\014topology_ids\030\001 \003(\0132" + "\023.context.TopologyId\"5\n\014TopologyList\022%\n\n" + "topologies\030\001 \003(\0132\021.context.Topology\"X\n\rT" + "opologyEvent\022\035\n\005event\030\001 \001(\0132\016.context.Ev" + "ent\022(\n\013topology_id\030\002 \001(\0132\023.context.Topol" + "ogyId\".\n\010DeviceId\022\"\n\013device_uuid\030\001 \001(\0132\r" + ".context.Uuid\"\372\002\n\006Device\022$\n\tdevice_id\030\001 " + "\001(\0132\021.context.DeviceId\022\014\n\004name\030\002 \001(\t\022\023\n\013" + "device_type\030\003 \001(\t\022,\n\rdevice_config\030\004 \001(\013" + "2\025.context.DeviceConfig\022G\n\031device_operat" + "ional_status\030\005 \001(\0162$.context.DeviceOpera" + "tionalStatusEnum\0221\n\016device_drivers\030\006 \003(\016" + "2\031.context.DeviceDriverEnum\022+\n\020device_en" + "dpoints\030\007 \003(\0132\021.context.EndPoint\022&\n\ncomp" + "onents\030\010 \003(\0132\022.context.Component\022(\n\rcont" + "roller_id\030\t \001(\0132\021.context.DeviceId\"\311\001\n\tC" + "omponent\022%\n\016component_uuid\030\001 \001(\0132\r.conte" + "xt.Uuid\022\014\n\004name\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\0226\n\na" + "ttributes\030\004 \003(\0132\".context.Component.Attr" + "ibutesEntry\022\016\n\006parent\030\005 \001(\t\0321\n\017Attribute" + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"9" + "\n\014DeviceConfig\022)\n\014config_rules\030\001 \003(\0132\023.c" + "ontext.ConfigRule\"5\n\014DeviceIdList\022%\n\ndev" + "ice_ids\030\001 \003(\0132\021.context.DeviceId\".\n\nDevi" + "ceList\022 \n\007devices\030\001 \003(\0132\017.context.Device" + "\"\216\001\n\014DeviceFilter\022)\n\ndevice_ids\030\001 \001(\0132\025." + "context.DeviceIdList\022\031\n\021include_endpoint" + "s\030\002 \001(\010\022\034\n\024include_config_rules\030\003 \001(\010\022\032\n" + "\022include_components\030\004 \001(\010\"\200\001\n\013DeviceEven" + "t\022\035\n\005event\030\001 \001(\0132\016.context.Event\022$\n\tdevi" + "ce_id\030\002 \001(\0132\021.context.DeviceId\022,\n\rdevice" + "_config\030\003 \001(\0132\025.context.DeviceConfig\"*\n\006" + "LinkId\022 \n\tlink_uuid\030\001 \001(\0132\r.context.Uuid" + "\"I\n\016LinkAttributes\022\033\n\023total_capacity_gbp" + "s\030\001 \001(\002\022\032\n\022used_capacity_gbps\030\002 \001(\002\"\275\001\n\004" + "Link\022 \n\007link_id\030\001 \001(\0132\017.context.LinkId\022\014" + "\n\004name\030\002 \001(\t\022(\n\tlink_type\030\003 \001(\0162\025.contex" + "t.LinkTypeEnum\022.\n\021link_endpoint_ids\030\004 \003(" + "\0132\023.context.EndPointId\022+\n\nattributes\030\005 \001" + "(\0132\027.context.LinkAttributes\"/\n\nLinkIdLis" + "t\022!\n\010link_ids\030\001 \003(\0132\017.context.LinkId\"(\n\010" + "LinkList\022\034\n\005links\030\001 \003(\0132\r.context.Link\"L" + "\n\tLinkEvent\022\035\n\005event\030\001 \001(\0132\016.context.Eve" + "nt\022 \n\007link_id\030\002 \001(\0132\017.context.LinkId\"X\n\t" + "ServiceId\022&\n\ncontext_id\030\001 \001(\0132\022.context." + "ContextId\022#\n\014service_uuid\030\002 \001(\0132\r.contex" + "t.Uuid\"\333\002\n\007Service\022&\n\nservice_id\030\001 \001(\0132\022" + ".context.ServiceId\022\014\n\004name\030\002 \001(\t\022.\n\014serv" + "ice_type\030\003 \001(\0162\030.context.ServiceTypeEnum" + "\0221\n\024service_endpoint_ids\030\004 \003(\0132\023.context" + ".EndPointId\0220\n\023service_constraints\030\005 \003(\013" + "2\023.context.Constraint\022.\n\016service_status\030" + "\006 \001(\0132\026.context.ServiceStatus\022.\n\016service" + "_config\030\007 \001(\0132\026.context.ServiceConfig\022%\n" + "\ttimestamp\030\010 \001(\0132\022.context.Timestamp\"C\n\r" + "ServiceStatus\0222\n\016service_status\030\001 \001(\0162\032." + "context.ServiceStatusEnum\":\n\rServiceConf" + "ig\022)\n\014config_rules\030\001 \003(\0132\023.context.Confi" + "gRule\"8\n\rServiceIdList\022\'\n\013service_ids\030\001 " + "\003(\0132\022.context.ServiceId\"1\n\013ServiceList\022\"" + "\n\010services\030\001 \003(\0132\020.context.Service\"\225\001\n\rS" + "erviceFilter\022+\n\013service_ids\030\001 \001(\0132\026.cont" + "ext.ServiceIdList\022\034\n\024include_endpoint_id" + "s\030\002 \001(\010\022\033\n\023include_constraints\030\003 \001(\010\022\034\n\024" + "include_config_rules\030\004 \001(\010\"U\n\014ServiceEve" + "nt\022\035\n\005event\030\001 \001(\0132\016.context.Event\022&\n\nser" + "vice_id\030\002 \001(\0132\022.context.ServiceId\"T\n\007Sli" + "ceId\022&\n\ncontext_id\030\001 \001(\0132\022.context.Conte" + "xtId\022!\n\nslice_uuid\030\002 \001(\0132\r.context.Uuid\"" + "\240\003\n\005Slice\022\"\n\010slice_id\030\001 \001(\0132\020.context.Sl" + "iceId\022\014\n\004name\030\002 \001(\t\022/\n\022slice_endpoint_id" + "s\030\003 \003(\0132\023.context.EndPointId\022.\n\021slice_co" + "nstraints\030\004 \003(\0132\023.context.Constraint\022-\n\021" + "slice_service_ids\030\005 \003(\0132\022.context.Servic" + "eId\022,\n\022slice_subslice_ids\030\006 \003(\0132\020.contex" + "t.SliceId\022*\n\014slice_status\030\007 \001(\0132\024.contex" + "t.SliceStatus\022*\n\014slice_config\030\010 \001(\0132\024.co" + "ntext.SliceConfig\022(\n\013slice_owner\030\t \001(\0132\023" + ".context.SliceOwner\022%\n\ttimestamp\030\n \001(\0132\022" + ".context.Timestamp\"E\n\nSliceOwner\022!\n\nowne" + "r_uuid\030\001 \001(\0132\r.context.Uuid\022\024\n\014owner_str" + "ing\030\002 \001(\t\"=\n\013SliceStatus\022.\n\014slice_status" + "\030\001 \001(\0162\030.context.SliceStatusEnum\"8\n\013Slic" + "eConfig\022)\n\014config_rules\030\001 \003(\0132\023.context." + "ConfigRule\"2\n\013SliceIdList\022#\n\tslice_ids\030\001" + " \003(\0132\020.context.SliceId\"+\n\tSliceList\022\036\n\006s" + "lices\030\001 \003(\0132\016.context.Slice\"\312\001\n\013SliceFil" + "ter\022\'\n\tslice_ids\030\001 \001(\0132\024.context.SliceId" + "List\022\034\n\024include_endpoint_ids\030\002 \001(\010\022\033\n\023in" + "clude_constraints\030\003 \001(\010\022\033\n\023include_servi" + "ce_ids\030\004 \001(\010\022\034\n\024include_subslice_ids\030\005 \001" + "(\010\022\034\n\024include_config_rules\030\006 \001(\010\"O\n\nSlic" + "eEvent\022\035\n\005event\030\001 \001(\0132\016.context.Event\022\"\n" + "\010slice_id\030\002 \001(\0132\020.context.SliceId\"6\n\014Con" + "nectionId\022&\n\017connection_uuid\030\001 \001(\0132\r.con" + "text.Uuid\"2\n\025ConnectionSettings_L0\022\031\n\021ls" + "p_symbolic_name\030\001 \001(\t\"\236\001\n\025ConnectionSett" + "ings_L2\022\027\n\017src_mac_address\030\001 \001(\t\022\027\n\017dst_" + "mac_address\030\002 \001(\t\022\022\n\nether_type\030\003 \001(\r\022\017\n" + "\007vlan_id\030\004 \001(\r\022\022\n\nmpls_label\030\005 \001(\r\022\032\n\022mp" + "ls_traffic_class\030\006 \001(\r\"t\n\025ConnectionSett" + "ings_L3\022\026\n\016src_ip_address\030\001 \001(\t\022\026\n\016dst_i" + "p_address\030\002 \001(\t\022\014\n\004dscp\030\003 \001(\r\022\020\n\010protoco" + "l\030\004 \001(\r\022\013\n\003ttl\030\005 \001(\r\"[\n\025ConnectionSettin" + "gs_L4\022\020\n\010src_port\030\001 \001(\r\022\020\n\010dst_port\030\002 \001(" + "\r\022\021\n\ttcp_flags\030\003 \001(\r\022\013\n\003ttl\030\004 \001(\r\"\304\001\n\022Co" + "nnectionSettings\022*\n\002l0\030\001 \001(\0132\036.context.C" + "onnectionSettings_L0\022*\n\002l2\030\002 \001(\0132\036.conte" + "xt.ConnectionSettings_L2\022*\n\002l3\030\003 \001(\0132\036.c" + "ontext.ConnectionSettings_L3\022*\n\002l4\030\004 \001(\013" + "2\036.context.ConnectionSettings_L4\"\363\001\n\nCon" + "nection\022,\n\rconnection_id\030\001 \001(\0132\025.context" + ".ConnectionId\022&\n\nservice_id\030\002 \001(\0132\022.cont" + "ext.ServiceId\0223\n\026path_hops_endpoint_ids\030" + "\003 \003(\0132\023.context.EndPointId\022+\n\017sub_servic" + "e_ids\030\004 \003(\0132\022.context.ServiceId\022-\n\010setti" + "ngs\030\005 \001(\0132\033.context.ConnectionSettings\"A" + "\n\020ConnectionIdList\022-\n\016connection_ids\030\001 \003" + "(\0132\025.context.ConnectionId\":\n\016ConnectionL" + "ist\022(\n\013connections\030\001 \003(\0132\023.context.Conne" + "ction\"^\n\017ConnectionEvent\022\035\n\005event\030\001 \001(\0132" + "\016.context.Event\022,\n\rconnection_id\030\002 \001(\0132\025" + ".context.ConnectionId\"\202\001\n\nEndPointId\022(\n\013" + "topology_id\030\001 \001(\0132\023.context.TopologyId\022$" + "\n\tdevice_id\030\002 \001(\0132\021.context.DeviceId\022$\n\r" + "endpoint_uuid\030\003 \001(\0132\r.context.Uuid\"\302\001\n\010E" + "ndPoint\022(\n\013endpoint_id\030\001 \001(\0132\023.context.E" + "ndPointId\022\014\n\004name\030\002 \001(\t\022\025\n\rendpoint_type" + "\030\003 \001(\t\0229\n\020kpi_sample_types\030\004 \003(\0162\037.kpi_s" + "ample_types.KpiSampleType\022,\n\021endpoint_lo" + "cation\030\005 \001(\0132\021.context.Location\"{\n\014EndPo" + "intName\022(\n\013endpoint_id\030\001 \001(\0132\023.context.E" + "ndPointId\022\023\n\013device_name\030\002 \001(\t\022\025\n\rendpoi" + "nt_name\030\003 \001(\t\022\025\n\rendpoint_type\030\004 \001(\t\";\n\016" + "EndPointIdList\022)\n\014endpoint_ids\030\001 \003(\0132\023.c" + "ontext.EndPointId\"A\n\020EndPointNameList\022-\n" + "\016endpoint_names\030\001 \003(\0132\025.context.EndPoint" + "Name\"A\n\021ConfigRule_Custom\022\024\n\014resource_ke" + "y\030\001 \001(\t\022\026\n\016resource_value\030\002 \001(\t\"]\n\016Confi" + "gRule_ACL\022(\n\013endpoint_id\030\001 \001(\0132\023.context" + ".EndPointId\022!\n\010rule_set\030\002 \001(\0132\017.acl.AclR" + "uleSet\"\234\001\n\nConfigRule\022)\n\006action\030\001 \001(\0162\031." + "context.ConfigActionEnum\022,\n\006custom\030\002 \001(\013" + "2\032.context.ConfigRule_CustomH\000\022&\n\003acl\030\003 " + "\001(\0132\027.context.ConfigRule_ACLH\000B\r\n\013config" + "_rule\"F\n\021Constraint_Custom\022\027\n\017constraint" + "_type\030\001 \001(\t\022\030\n\020constraint_value\030\002 \001(\t\"E\n" + "\023Constraint_Schedule\022\027\n\017start_timestamp\030" + "\001 \001(\001\022\025\n\rduration_days\030\002 \001(\002\"3\n\014GPS_Posi" + "tion\022\020\n\010latitude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001(" + "\002\"\204\001\n\010Location\022\020\n\006region\030\001 \001(\tH\000\022-\n\014gps_" + "position\030\002 \001(\0132\025.context.GPS_PositionH\000\022" + "\023\n\tinterface\030\003 \001(\tH\000\022\026\n\014circuit_pack\030\004 \001" + "(\tH\000B\n\n\010location\"l\n\033Constraint_EndPointL" + "ocation\022(\n\013endpoint_id\030\001 \001(\0132\023.context.E" + "ndPointId\022#\n\010location\030\002 \001(\0132\021.context.Lo" + "cation\"Y\n\033Constraint_EndPointPriority\022(\n" + "\013endpoint_id\030\001 \001(\0132\023.context.EndPointId\022" + "\020\n\010priority\030\002 \001(\r\"0\n\026Constraint_SLA_Late" + "ncy\022\026\n\016e2e_latency_ms\030\001 \001(\002\"0\n\027Constrain" + "t_SLA_Capacity\022\025\n\rcapacity_gbps\030\001 \001(\002\"c\n" + "\033Constraint_SLA_Availability\022\032\n\022num_disj" + "oint_paths\030\001 \001(\r\022\022\n\nall_active\030\002 \001(\010\022\024\n\014" + "availability\030\003 \001(\002\"V\n\036Constraint_SLA_Iso" + "lation_level\0224\n\017isolation_level\030\001 \003(\0162\033." + "context.IsolationLevelEnum\"\242\001\n\025Constrain" + "t_Exclusions\022\024\n\014is_permanent\030\001 \001(\010\022%\n\nde" + "vice_ids\030\002 \003(\0132\021.context.DeviceId\022)\n\014end" + "point_ids\030\003 \003(\0132\023.context.EndPointId\022!\n\010" + "link_ids\030\004 \003(\0132\017.context.LinkId\"5\n\014QoSPr" + "ofileId\022%\n\016qos_profile_id\030\001 \001(\0132\r.contex" + "t.Uuid\"`\n\025Constraint_QoSProfile\022-\n\016qos_p" + "rofile_id\030\001 \001(\0132\025.context.QoSProfileId\022\030" + "\n\020qos_profile_name\030\002 \001(\t\"\222\005\n\nConstraint\022" + "-\n\006action\030\001 \001(\0162\035.context.ConstraintActi" + "onEnum\022,\n\006custom\030\002 \001(\0132\032.context.Constra" + "int_CustomH\000\0220\n\010schedule\030\003 \001(\0132\034.context" + ".Constraint_ScheduleH\000\022A\n\021endpoint_locat" + "ion\030\004 \001(\0132$.context.Constraint_EndPointL" + "ocationH\000\022A\n\021endpoint_priority\030\005 \001(\0132$.c" + "ontext.Constraint_EndPointPriorityH\000\0228\n\014" + "sla_capacity\030\006 \001(\0132 .context.Constraint_" + "SLA_CapacityH\000\0226\n\013sla_latency\030\007 \001(\0132\037.co" + "ntext.Constraint_SLA_LatencyH\000\022@\n\020sla_av" + "ailability\030\010 \001(\0132$.context.Constraint_SL" + "A_AvailabilityH\000\022@\n\rsla_isolation\030\t \001(\0132" + "\'.context.Constraint_SLA_Isolation_level" + "H\000\0224\n\nexclusions\030\n \001(\0132\036.context.Constra" + "int_ExclusionsH\000\0225\n\013qos_profile\030\013 \001(\0132\036." + "context.Constraint_QoSProfileH\000B\014\n\nconst" + "raint\"^\n\022TeraFlowController\022&\n\ncontext_i" + "d\030\001 \001(\0132\022.context.ContextId\022\022\n\nip_addres" + "s\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n\024AuthenticationR" + "esult\022&\n\ncontext_id\030\001 \001(\0132\022.context.Cont" + "extId\022\025\n\rauthenticated\030\002 \001(\010\"-\n\017OpticalC" + "onfigId\022\032\n\022opticalconfig_uuid\030\001 \001(\t\"y\n\rO" + "pticalConfig\0222\n\020opticalconfig_id\030\001 \001(\0132\030" + ".context.OpticalConfigId\022\016\n\006config\030\002 \001(\t" + "\022$\n\tdevice_id\030\003 \001(\0132\021.context.DeviceId\"C" + "\n\021OpticalConfigList\022.\n\016opticalconfigs\030\001 " + "\003(\0132\026.context.OpticalConfig\"g\n\022OpticalCo" + "nfigEvent\022\035\n\005event\030\001 \001(\0132\016.context.Event" + "\0222\n\020opticalconfig_id\030\002 \001(\0132\030.context.Opt" + "icalConfigId\"_\n\021OpticalEndPointId\022$\n\tdev" + "ice_id\030\002 \001(\0132\021.context.DeviceId\022$\n\rendpo" + "int_uuid\030\003 \001(\0132\r.context.Uuid\">\n\017Optical" + "LinkList\022+\n\roptical_links\030\001 \003(\0132\024.contex" + "t.OpticalLink\"\304\003\n\022OpticalLinkDetails\022\016\n\006" + "length\030\001 \001(\002\022\020\n\010src_port\030\002 \001(\t\022\020\n\010dst_po" + "rt\030\003 \001(\t\022\027\n\017local_peer_port\030\004 \001(\t\022\030\n\020rem" + "ote_peer_port\030\005 \001(\t\022\014\n\004used\030\006 \001(\010\0228\n\007c_s" + "lots\030\007 \003(\0132\'.context.OpticalLinkDetails." + "CSlotsEntry\0228\n\007l_slots\030\010 \003(\0132\'.context.O" + "pticalLinkDetails.LSlotsEntry\0228\n\007s_slots" + "\030\t \003(\0132\'.context.OpticalLinkDetails.SSlo" + "tsEntry\032-\n\013CSlotsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + "alue\030\002 \001(\005:\0028\001\032-\n\013LSlotsEntry\022\013\n\003key\030\001 \001" + "(\t\022\r\n\005value\030\002 \001(\005:\0028\001\032-\n\013SSlotsEntry\022\013\n\003" + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\"\243\001\n\013Optical" + "Link\022\014\n\004name\030\001 \001(\t\0224\n\017optical_details\030\002 " + "\001(\0132\033.context.OpticalLinkDetails\022 \n\007link" + "_id\030\003 \001(\0132\017.context.LinkId\022.\n\021link_endpo" + "int_ids\030\004 \003(\0132\023.context.EndPointId\"r\n\021Se" + "rviceConfigRule\022&\n\nservice_id\030\001 \001(\0132\022.co" + "ntext.ServiceId\0225\n\021configrule_custom\030\002 \001" + "(\0132\032.context.ConfigRule_Custom*j\n\rEventT" + "ypeEnum\022\027\n\023EVENTTYPE_UNDEFINED\020\000\022\024\n\020EVEN" + "TTYPE_CREATE\020\001\022\024\n\020EVENTTYPE_UPDATE\020\002\022\024\n\020" + "EVENTTYPE_REMOVE\020\003*\316\003\n\020DeviceDriverEnum\022" + "\032\n\026DEVICEDRIVER_UNDEFINED\020\000\022\033\n\027DEVICEDRI" + "VER_OPENCONFIG\020\001\022\036\n\032DEVICEDRIVER_TRANSPO" + "RT_API\020\002\022\023\n\017DEVICEDRIVER_P4\020\003\022&\n\"DEVICED" + "RIVER_IETF_NETWORK_TOPOLOGY\020\004\022\033\n\027DEVICED" + "RIVER_ONF_TR_532\020\005\022\023\n\017DEVICEDRIVER_XR\020\006\022" + "\033\n\027DEVICEDRIVER_IETF_L2VPN\020\007\022 \n\034DEVICEDR" + "IVER_GNMI_OPENCONFIG\020\010\022\034\n\030DEVICEDRIVER_O" + "PTICAL_TFS\020\t\022\032\n\026DEVICEDRIVER_IETF_ACTN\020\n" + "\022\023\n\017DEVICEDRIVER_OC\020\013\022\024\n\020DEVICEDRIVER_QK" + "D\020\014\022\033\n\027DEVICEDRIVER_IETF_L3VPN\020\r\022\033\n\027DEVI" + "CEDRIVER_IETF_SLICE\020\016\022\024\n\020DEVICEDRIVER_NC" + "E\020\017*\217\001\n\033DeviceOperationalStatusEnum\022%\n!D" + "EVICEOPERATIONALSTATUS_UNDEFINED\020\000\022$\n DE" + "VICEOPERATIONALSTATUS_DISABLED\020\001\022#\n\037DEVI" + "CEOPERATIONALSTATUS_ENABLED\020\002*w\n\014LinkTyp" + "eEnum\022\024\n\020LINKTYPE_UNKNOWN\020\000\022\023\n\017LINKTYPE_" + "COPPER\020\001\022\022\n\016LINKTYPE_FIBER\020\002\022\022\n\016LINKTYPE" + "_RADIO\020\003\022\024\n\020LINKTYPE_VIRTUAL\020\004*\345\001\n\017Servi" + "ceTypeEnum\022\027\n\023SERVICETYPE_UNKNOWN\020\000\022\024\n\020S" + "ERVICETYPE_L3NM\020\001\022\024\n\020SERVICETYPE_L2NM\020\002\022" + ")\n%SERVICETYPE_TAPI_CONNECTIVITY_SERVICE" + "\020\003\022\022\n\016SERVICETYPE_TE\020\004\022\023\n\017SERVICETYPE_E2" + "E\020\005\022$\n SERVICETYPE_OPTICAL_CONNECTIVITY\020" + "\006\022\023\n\017SERVICETYPE_QKD\020\007*\304\001\n\021ServiceStatus" + "Enum\022\033\n\027SERVICESTATUS_UNDEFINED\020\000\022\031\n\025SER" + "VICESTATUS_PLANNED\020\001\022\030\n\024SERVICESTATUS_AC" + "TIVE\020\002\022\032\n\026SERVICESTATUS_UPDATING\020\003\022!\n\035SE" + "RVICESTATUS_PENDING_REMOVAL\020\004\022\036\n\032SERVICE" + "STATUS_SLA_VIOLATED\020\005*\251\001\n\017SliceStatusEnu" + "m\022\031\n\025SLICESTATUS_UNDEFINED\020\000\022\027\n\023SLICESTA" + "TUS_PLANNED\020\001\022\024\n\020SLICESTATUS_INIT\020\002\022\026\n\022S" + "LICESTATUS_ACTIVE\020\003\022\026\n\022SLICESTATUS_DEINI" + "T\020\004\022\034\n\030SLICESTATUS_SLA_VIOLATED\020\005*]\n\020Con" + "figActionEnum\022\032\n\026CONFIGACTION_UNDEFINED\020" + "\000\022\024\n\020CONFIGACTION_SET\020\001\022\027\n\023CONFIGACTION_" + "DELETE\020\002*m\n\024ConstraintActionEnum\022\036\n\032CONS" + "TRAINTACTION_UNDEFINED\020\000\022\030\n\024CONSTRAINTAC" + "TION_SET\020\001\022\033\n\027CONSTRAINTACTION_DELETE\020\002*" + "\203\002\n\022IsolationLevelEnum\022\020\n\014NO_ISOLATION\020\000" + "\022\026\n\022PHYSICAL_ISOLATION\020\001\022\025\n\021LOGICAL_ISOL" + "ATION\020\002\022\025\n\021PROCESS_ISOLATION\020\003\022\035\n\031PHYSIC" + "AL_MEMORY_ISOLATION\020\004\022\036\n\032PHYSICAL_NETWOR" + "K_ISOLATION\020\005\022\036\n\032VIRTUAL_RESOURCE_ISOLAT" + "ION\020\006\022\037\n\033NETWORK_FUNCTIONS_ISOLATION\020\007\022\025" + "\n\021SERVICE_ISOLATION\020\0102\202\034\n\016ContextService" + "\022:\n\016ListContextIds\022\016.context.Empty\032\026.con" + "text.ContextIdList\"\000\0226\n\014ListContexts\022\016.c" + "ontext.Empty\032\024.context.ContextList\"\000\0224\n\n" + "GetContext\022\022.context.ContextId\032\020.context" + ".Context\"\000\0224\n\nSetContext\022\020.context.Conte" + "xt\032\022.context.ContextId\"\000\0225\n\rRemoveContex" + "t\022\022.context.ContextId\032\016.context.Empty\"\000\022" + "=\n\020GetContextEvents\022\016.context.Empty\032\025.co" + "ntext.ContextEvent\"\0000\001\022@\n\017ListTopologyId" + "s\022\022.context.ContextId\032\027.context.Topology" + "IdList\"\000\022=\n\016ListTopologies\022\022.context.Con" + "textId\032\025.context.TopologyList\"\000\0227\n\013GetTo" + "pology\022\023.context.TopologyId\032\021.context.To" + "pology\"\000\022E\n\022GetTopologyDetails\022\023.context" + ".TopologyId\032\030.context.TopologyDetails\"\000\022" + "7\n\013SetTopology\022\021.context.Topology\032\023.cont" + "ext.TopologyId\"\000\0227\n\016RemoveTopology\022\023.con" + "text.TopologyId\032\016.context.Empty\"\000\022?\n\021Get" + "TopologyEvents\022\016.context.Empty\032\026.context" + ".TopologyEvent\"\0000\001\0228\n\rListDeviceIds\022\016.co" + "ntext.Empty\032\025.context.DeviceIdList\"\000\0224\n\013" + "ListDevices\022\016.context.Empty\032\023.context.De" + "viceList\"\000\0221\n\tGetDevice\022\021.context.Device" + "Id\032\017.context.Device\"\000\0221\n\tSetDevice\022\017.con" + "text.Device\032\021.context.DeviceId\"\000\0223\n\014Remo" + "veDevice\022\021.context.DeviceId\032\016.context.Em" + "pty\"\000\022;\n\017GetDeviceEvents\022\016.context.Empty" + "\032\024.context.DeviceEvent\"\0000\001\022<\n\014SelectDevi" + "ce\022\025.context.DeviceFilter\032\023.context.Devi" + "ceList\"\000\022I\n\021ListEndPointNames\022\027.context." + "EndPointIdList\032\031.context.EndPointNameLis" + "t\"\000\0224\n\013ListLinkIds\022\016.context.Empty\032\023.con" + "text.LinkIdList\"\000\0220\n\tListLinks\022\016.context" + ".Empty\032\021.context.LinkList\"\000\022+\n\007GetLink\022\017" + ".context.LinkId\032\r.context.Link\"\000\022+\n\007SetL" + "ink\022\r.context.Link\032\017.context.LinkId\"\000\022/\n" + "\nRemoveLink\022\017.context.LinkId\032\016.context.E" + "mpty\"\000\0227\n\rGetLinkEvents\022\016.context.Empty\032" + "\022.context.LinkEvent\"\0000\001\022>\n\016ListServiceId" + "s\022\022.context.ContextId\032\026.context.ServiceI" + "dList\"\000\022:\n\014ListServices\022\022.context.Contex" + "tId\032\024.context.ServiceList\"\000\0224\n\nGetServic" + "e\022\022.context.ServiceId\032\020.context.Service\"" + "\000\0224\n\nSetService\022\020.context.Service\032\022.cont" + "ext.ServiceId\"\000\0226\n\014UnsetService\022\020.contex" + "t.Service\032\022.context.ServiceId\"\000\0225\n\rRemov" + "eService\022\022.context.ServiceId\032\016.context.E" + "mpty\"\000\022=\n\020GetServiceEvents\022\016.context.Emp" + "ty\032\025.context.ServiceEvent\"\0000\001\022?\n\rSelectS" + "ervice\022\026.context.ServiceFilter\032\024.context" + ".ServiceList\"\000\022:\n\014ListSliceIds\022\022.context" + ".ContextId\032\024.context.SliceIdList\"\000\0226\n\nLi" + "stSlices\022\022.context.ContextId\032\022.context.S" + "liceList\"\000\022.\n\010GetSlice\022\020.context.SliceId" + "\032\016.context.Slice\"\000\022.\n\010SetSlice\022\016.context" + ".Slice\032\020.context.SliceId\"\000\0220\n\nUnsetSlice" + "\022\016.context.Slice\032\020.context.SliceId\"\000\0221\n\013" + "RemoveSlice\022\020.context.SliceId\032\016.context." + "Empty\"\000\0229\n\016GetSliceEvents\022\016.context.Empt" + "y\032\023.context.SliceEvent\"\0000\001\0229\n\013SelectSlic" + "e\022\024.context.SliceFilter\032\022.context.SliceL" + "ist\"\000\022D\n\021ListConnectionIds\022\022.context.Ser" + "viceId\032\031.context.ConnectionIdList\"\000\022@\n\017L" + "istConnections\022\022.context.ServiceId\032\027.con" + "text.ConnectionList\"\000\022=\n\rGetConnection\022\025" + ".context.ConnectionId\032\023.context.Connecti" + "on\"\000\022=\n\rSetConnection\022\023.context.Connecti" + "on\032\025.context.ConnectionId\"\000\022;\n\020RemoveCon" + "nection\022\025.context.ConnectionId\032\016.context" + ".Empty\"\000\022C\n\023GetConnectionEvents\022\016.contex" + "t.Empty\032\030.context.ConnectionEvent\"\0000\001\022@\n" + "\020GetOpticalConfig\022\016.context.Empty\032\032.cont" + "ext.OpticalConfigList\"\000\022F\n\020SetOpticalCon" + "fig\022\026.context.OpticalConfig\032\030.context.Op" + "ticalConfigId\"\000\022I\n\023UpdateOpticalConfig\022\026" + ".context.OpticalConfig\032\030.context.Optical" + "ConfigId\"\000\022I\n\023SelectOpticalConfig\022\030.cont" + "ext.OpticalConfigId\032\026.context.OpticalCon" + "fig\"\000\022A\n\023DeleteOpticalConfig\022\030.context.O" + "pticalConfigId\032\016.context.Empty\"\000\022@\n\024Dele" + "teOpticalChannel\022\026.context.OpticalConfig" + "\032\016.context.Empty\"\000\0228\n\016SetOpticalLink\022\024.c" + "ontext.OpticalLink\032\016.context.Empty\"\000\0229\n\016" + "GetOpticalLink\022\017.context.LinkId\032\024.contex" + "t.OpticalLink\"\000\0226\n\021DeleteOpticalLink\022\017.c" + "ontext.LinkId\032\016.context.Empty\"\000\022@\n\022GetOp" + "ticalLinkList\022\016.context.Empty\032\030.context." + "OpticalLinkList\"\000\022G\n\027DeleteServiceConfig" + "Rule\022\032.context.ServiceConfigRule\032\016.conte" + "xt.Empty\"\000b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { acl.Acl.getDescriptor(), kpi_sample_types.KpiSampleTypes.getDescriptor() }); internal_static_context_Empty_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_context_Empty_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Empty_descriptor, new java.lang.String[] {}); @@ -80858,7 +80880,7 @@ public final class ContextOuterClass { internal_static_context_LinkAttributes_descriptor = getDescriptor().getMessageTypes().get(24); internal_static_context_LinkAttributes_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkAttributes_descriptor, new java.lang.String[] { "TotalCapacityGbps", "UsedCapacityGbps" }); internal_static_context_Link_descriptor = getDescriptor().getMessageTypes().get(25); - internal_static_context_Link_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Link_descriptor, new java.lang.String[] { "LinkId", "Name", "LinkEndpointIds", "Attributes", "LinkType" }); + internal_static_context_Link_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Link_descriptor, new java.lang.String[] { "LinkId", "Name", "LinkType", "LinkEndpointIds", "Attributes" }); internal_static_context_LinkIdList_descriptor = getDescriptor().getMessageTypes().get(26); internal_static_context_LinkIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkIdList_descriptor, new java.lang.String[] { "LinkIds" }); internal_static_context_LinkList_descriptor = getDescriptor().getMessageTypes().get(27); diff --git a/src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java b/src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java index 9621efb4b..2a8a62593 100644 --- a/src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java +++ b/src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java @@ -95,6 +95,38 @@ public final class KpiSampleTypes { * KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; */ KPISAMPLETYPE_SERVICE_LATENCY_MS(701), + /** + *
+         * output KPIs
+         * 
+ * + * KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT = 1101; + */ + KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT(1101), + /** + * KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT = 1102; + */ + KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT(1102), + /** + * KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT = 1103; + */ + KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT(1103), + /** + * KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT = 1201; + */ + KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT(1201), + /** + * KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT = 1202; + */ + KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT(1202), + /** + * KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT = 1203; + */ + KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT(1203), + /** + * KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT = 1701; + */ + KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT(1701), UNRECOGNIZED(-1); /** @@ -190,6 +222,45 @@ public final class KpiSampleTypes { */ public static final int KPISAMPLETYPE_SERVICE_LATENCY_MS_VALUE = 701; + /** + *
+         * output KPIs
+         * 
+ * + * KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT = 1101; + */ + public static final int KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT_VALUE = 1101; + + /** + * KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT = 1102; + */ + public static final int KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT_VALUE = 1102; + + /** + * KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT = 1103; + */ + public static final int KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT_VALUE = 1103; + + /** + * KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT = 1201; + */ + public static final int KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT_VALUE = 1201; + + /** + * KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT = 1202; + */ + public static final int KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT_VALUE = 1202; + + /** + * KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT = 1203; + */ + public static final int KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT_VALUE = 1203; + + /** + * KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT = 1701; + */ + public static final int KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT_VALUE = 1701; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); @@ -247,6 +318,20 @@ public final class KpiSampleTypes { return KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO; case 701: return KPISAMPLETYPE_SERVICE_LATENCY_MS; + case 1101: + return KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT; + case 1102: + return KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT; + case 1103: + return KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT; + case 1201: + return KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT; + case 1202: + return KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT; + case 1203: + return KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT; + case 1701: + return KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT; default: return null; } @@ -304,7 +389,7 @@ public final class KpiSampleTypes { private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { "\n\026kpi_sample_types.proto\022\020kpi_sample_typ" + "es*\260\005\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + "KNOWN\020\000\022%\n!KPISAMPLETYPE_PACKETS_TRANSMI" + "TTED\020e\022\"\n\036KPISAMPLETYPE_PACKETS_RECEIVED" + "\020f\022!\n\035KPISAMPLETYPE_PACKETS_DROPPED\020g\022$\n" + "\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001\022!\n\034K" + "PISAMPLETYPE_BYTES_RECEIVED\020\312\001\022 \n\033KPISAM" + "PLETYPE_BYTES_DROPPED\020\313\001\022+\n&KPISAMPLETYP" + "E_LINK_TOTAL_CAPACITY_GBPS\020\255\002\022*\n%KPISAMP" + "LETYPE_LINK_USED_CAPACITY_GBPS\020\256\002\022 \n\033KPI" + "SAMPLETYPE_ML_CONFIDENCE\020\221\003\022*\n%KPISAMPLE" + "TYPE_OPTICAL_SECURITY_STATUS\020\365\003\022)\n$KPISA" + "MPLETYPE_L3_UNIQUE_ATTACK_CONNS\020\331\004\022*\n%KP" + "ISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS\020\332\004\022&" + "\n!KPISAMPLETYPE_L3_UNIQUE_ATTACKERS\020\333\004\0220" + "\n+KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CL" + "IENTS\020\334\004\022,\n\'KPISAMPLETYPE_L3_SECURITY_ST" + "ATUS_CRYPTO\020\335\004\022%\n KPISAMPLETYPE_SERVICE_" + "LATENCY_MS\020\275\005b\006proto3" }; + java.lang.String[] descriptorData = { "\n\026kpi_sample_types.proto\022\020kpi_sample_typ" + "es*\200\010\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + "KNOWN\020\000\022%\n!KPISAMPLETYPE_PACKETS_TRANSMI" + "TTED\020e\022\"\n\036KPISAMPLETYPE_PACKETS_RECEIVED" + "\020f\022!\n\035KPISAMPLETYPE_PACKETS_DROPPED\020g\022$\n" + "\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001\022!\n\034K" + "PISAMPLETYPE_BYTES_RECEIVED\020\312\001\022 \n\033KPISAM" + "PLETYPE_BYTES_DROPPED\020\313\001\022+\n&KPISAMPLETYP" + "E_LINK_TOTAL_CAPACITY_GBPS\020\255\002\022*\n%KPISAMP" + "LETYPE_LINK_USED_CAPACITY_GBPS\020\256\002\022 \n\033KPI" + "SAMPLETYPE_ML_CONFIDENCE\020\221\003\022*\n%KPISAMPLE" + "TYPE_OPTICAL_SECURITY_STATUS\020\365\003\022)\n$KPISA" + "MPLETYPE_L3_UNIQUE_ATTACK_CONNS\020\331\004\022*\n%KP" + "ISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS\020\332\004\022&" + "\n!KPISAMPLETYPE_L3_UNIQUE_ATTACKERS\020\333\004\0220" + "\n+KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CL" + "IENTS\020\334\004\022,\n\'KPISAMPLETYPE_L3_SECURITY_ST" + "ATUS_CRYPTO\020\335\004\022%\n KPISAMPLETYPE_SERVICE_" + "LATENCY_MS\020\275\005\0221\n,KPISAMPLETYPE_PACKETS_T" + "RANSMITTED_AGG_OUTPUT\020\315\010\022.\n)KPISAMPLETYP" + "E_PACKETS_RECEIVED_AGG_OUTPUT\020\316\010\022-\n(KPIS" + "AMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT\020\317\010\022" + "/\n*KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_O" + "UTPUT\020\261\t\022,\n\'KPISAMPLETYPE_BYTES_RECEIVED" + "_AGG_OUTPUT\020\262\t\022+\n&KPISAMPLETYPE_BYTES_DR" + "OPPED_AGG_OUTPUT\020\263\t\0220\n+KPISAMPLETYPE_SER" + "VICE_LATENCY_MS_AGG_OUTPUT\020\245\rb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); } // @@protoc_insertion_point(outer_class_scope) -- GitLab